#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,avx,avx2")
#pragma GCC optimize("unroll-loops")
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define req(i,a,b) for(int i=(a);i>=(b);--i)
#define rep_(i,a,b) for(int i=(a);i<(b).size();++i)
#define F(a) rep(a,1,n)
#define M(a,b) memset(a,b,sizeof a)
#define DC int T;cin>>T;while(T--)
#define ll long long
#define Z(a,b) sort(a+1,a+b+1)
using namespace std;
const unsigned _mod=998244353;
const unsigned mod=1e9+7;
const ll infi=0x3f3f3f3f3f3f3fll;
const int inf=0x3f3f3f3f;
void rd(auto &x){x=0;int f=1;char ch=getchar();while(ch<48||ch>57){if(ch==45)f=-1;ch=getchar();}while(ch>=48&&ch<=57)x=x*10+ch-48,ch=getchar();x*=f;}
ll ksm(ll x,ll y=mod-2,ll m=mod){ll ret=1;while(y){if(y&1)ret=ret*x%m;y>>=1ll;x=x*x%m;}return ret;}
ll qpow(ll x,ll y){ll ret=1;while(y){if(y&1ll)ret=ret*x;y>>=1ll;x=x*x;}return ret;}
/*
    [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
    [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
*/
ll n,a[110],dp[110][110][110],x,ans=1e18+17;
int main()
{
    cin>>n>>x;
	F(i) rd(a[i]);
	F(i)
	{
		ll p=x%i;
		rep(j1,0,109) rep(j2,0,109) rep(j3,0,109) dp[j1][j2][j3]=-infi;
		dp[0][0][0]=0;
		F(j) 
		{
			F(__) rep(_,0,i-1) if (dp[j-1][__-1][_]!=-infi) if (dp[j-1][__-1][_]+a[j]<=x) dp[j][__][(_+a[j])%i]=max(dp[j][__][(_+a[j])%i],dp[j-1][__-1][_]+a[j]);
			F(__) rep(_,0,i-1) if (dp[j][__][_]!=-infi) dp[j+1][__][_]=max(dp[j+1][__][_],dp[j][__][_]);
		}
		if (dp[n][i][p]!=-infi) ans=min(ans,(x-dp[n][i][p])/i);
		//cerr<<dp[n][i][p]<<'\n';
	}
	cout<<ans<<'\n';
	return 0;
}
#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);


	ll N, X;
	cin >> N >> X;
	ll A[100];
	rep(i, N) cin >> A[i];

	ll kotae = 2e18;
	rep1(s, N) {
		ll wari = X / s;
		ll amari = X % s;

		ll dp[101][101] = {};
		rep(i, s + 1) rep(j, s + 1) dp[i][j] = -1;
		dp[0][0] = 0;
		rep(i, N) {
			for (int j = min(i, s); j >= 0; j--) rep(k, s) if(dp[j][k] >= 0) {
				chmax(dp[j + 1][(k + A[i]) % s], dp[j][k] + (k + A[i]) / s);
			}
		}
		if (dp[s][amari] >= 0) {
			chmin(kotae, wari - dp[s][amari]);
		}
	}
	co(kotae);

	Would you please return 0;
}