#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
#define name "GDARTS"
#define forw(i, a, b) for (int i = a; i <= b; ++i)
#define fors(i, a, b) for (int i = a; i >= b; --i)
using namespace std;
const int N = 1e3;

template <class X, class Y>
bool maximize(X &x, const Y &y)
{
    return x < y ? x = y, true : false;
}

int n, m;
ll a[N + 5], ans = 0;
int main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    if (fopen(name".INP", "r"))
    {
        freopen(name".INP", "r", stdin);
        freopen(name".OUT", "w", stdout);
    }

    cin >> n >> m;
    forw (i, 1, n) cin >> a[i];

    sort(a + 1, a + n + 1);
    fors (i, n, 1)
        ans += a[i] * ((m - ans) / a[i]);

    cout << ans << endl;
    return 0;
}
