#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;

int64_t synthesis(int num,int64_t x,vector<int> &a);
const int64_t _infinity=(int64_t)1000000000000000000+1;

int main()
{
	int n;
	int64_t x;
	cin >> n >> x;

	vector<int> a(n);
	for (int i=0;i<n;++i)
	{
		cin >> a[i];
	}
	sort(a.begin(),a.end());

	int64_t fastest=_infinity;
	for (int i=1;i<=n;++i)
	{
		fastest=min(fastest,synthesis(i,x,a));
	}
	cout << fastest << endl;
}

int64_t synthesis(int num,int64_t x,vector<int> &a)
{
	vector<vector<int>> dp(num+1,vector<int>(num,-1));
	for (int i=0;i<a.size();++i)
	{
		int modulo=a[i]%num;
		for (int j=num-1;j>=1;--j)
		{
			for (int k=0;k<num;++k)
			{
				if (dp[j][k]<0)
				{
					continue;
				}
				int k2=k+modulo;
				if (k2>=num)
				{
					k2-=num;
				}
				dp[j+1][k2]=max(dp[j+1][k2],dp[j][k]+a[i]);
			}
		}
		dp[1][modulo]=a[i];

#ifdef NEVER_DEFINED
		fprintf(stderr,"%d %d\n",i,a[i]);
		for (int j=1;j<=num;++j)
		{
			fprintf(stderr,"%d: ",j);
			for (int k=0;k<num;++k)
			{
				fprintf(stderr,"%d ",dp[j][k]);
			}
			fprintf(stderr,"\n");
		}
		fprintf(stderr,"\n");
#endif // NEVER_DEFINED
	}
	return (dp[num][x%num]>0) ? (x-dp[num][x%num])/num : _infinity;
}







#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(40)

const ll MOD = 1000000007;
const ll INF = (ll) 1e18 + 10;

ll N, X;
ll A[105];
ll S[105][105][105][105];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> X;
    REP(i, N) {
        cin >> A[i];
    }
    memset(S, -1, sizeof(S));
    sort(A, A + N, greater<ll>());

    FOR(i, N + 1, 1) {
        S[0][0][i][X % i] = 0;
    }
    REP(i, N) {
        REP(j, i + 1) {
            FOR(a, N + 1, 1) {
                REP(b, N + 1) {
                    S[i + 1][j][a][b] = std::max(S[i + 1][j][a][b], S[i][j][a][b]);
                    if (S[i][j][a][b] < 0)
                        continue;
                    ll s = S[i][j][a][b] + A[i];
                    ll p = (X - s) % a;
                    S[i + 1][j + 1][a][p] = std::max(S[i + 1][j + 1][a][p], s);
                }
            }
        }
    }

    ll ans = INF;
    FOR(i, N + 1, 1) {
        if (S[N][i][i][0] < 0)
            continue;
        ans = std::min(ans, (X - S[N][i][i][0]) / i);
    }
    cout << ans << endl;
    return 0;
}