#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int sz = 105;

int dp[sz][sz][sz], ara[sz], a[sz], bm;

int fnc(int n, int k, int m) {
   if(!n) return 0;
   int &w = dp[n][k][m];
   if(w < 0) {
      w = fnc(n - 1, k, m);
      if(k == 1) {
         if(a[n] == m) w = max(w, ara[n]);
      }
      else {
         int y = (m - a[n] + bm) % bm;
         int z = fnc(n - 1, k - 1, y);
         if(z) w = max(w, ara[n] + z);
      }
   }
   return w;
}

int main() {
   int n; ll x;
   cin >> n >> x;
   for(int i=1; i<=n; i++) scanf("%d", &ara[i]);

   ll ans = LLONG_MAX;
   for(int k=1; k<=n; k++) {
      for(int i=1; i<=n; i++) a[i] = ara[i] % k;
      memset(dp, -1, sizeof(dp));
      bm = k;
      int now = fnc(n, k, x % k);
      if(now) ans = min(ans, (x - now) / k);
   }
   cout << ans;
}

#include<bits/stdc++.h>
#define forn(i,s,t) for(register int i=(s);i<=(t);++i)
#define form(i,s,t) for(register int i=(s);i>=(t);--i)
using namespace std;
typedef long long LL;
const int N = 1e2+3;
const LL INF = 2e18;
template<typename T>inline T Max(T A, T B) {return A>B?A:B;}
template<typename T>inline T Min(T A, T B) {return A<B?A:B;}
LL a[N], f[N][N], X, Ans; int n;
int main() {
	scanf("%d%lld", &n, &X);
	forn(i,1,n) scanf("%lld", a+i);
	Ans = INF;
	forn(i,1,n) {
		forn(j,1,n) form(k,i-1,0) f[j][k] = -1;
		f[0][0] = 0;
		forn(j,1,n) form(k,i,0) forn(l,0,i-1) if(f[k][l] != -1) {
			LL tmp = f[k][l] + a[j];
			f[k+1][tmp % i] = Max(f[k+1][tmp % i], tmp);
		}
		if(f[i][X % i] != -1) Ans = Min(Ans, (X - f[i][X % i]) / i);
	}
	printf("%lld\n", Ans);
	return 0;
}