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

int main() {
  int N;
  long long int X;
  cin >> N >> X;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  
  long long int ans = 2000000000000000000;
  for (int C = 1; C <= N; C++) {
    int MOD = X % C;
    vector<vector<vector<long long int>>> DP(N + 1, vector<vector<long long int>>(C + 1, vector<long long int>(C, -1)));
    DP.at(0).at(0).at(0) = 0;
    for (int i = 1; i <= N; i++) {
      for (int j = 0; j <= C; j++) {
        for (int k = 0; k < C; k++) {
          if (DP.at(i - 1).at(j).at(k) != -1) DP.at(i).at(j).at(k) = DP.at(i - 1).at(j).at(k);
          int kk = k - (A.at(i - 1) % C);
          if (kk < 0) kk += C;
          if (j > 0 && DP.at(i - 1).at(j - 1).at(kk) != -1) DP.at(i).at(j).at(k) = max(DP.at(i).at(j).at(k), DP.at(i - 1).at(j - 1).at(kk) + A.at(i - 1));
        }
      }
    }
    if (DP.at(N).at(C).at(MOD) > 0) ans = min(ans, (X - DP.at(N).at(C).at(MOD)) / C);
  }
  cout << ans << endl;
}
//#define _DEBUG
#include "bits/stdc++.h"
//#include <atcoder/all>
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0,a1,a2,a3,a4,a5,x,...) x
#define debug_1(x1) cout<<#x1<<": "<<x1<<endl
#define debug_2(x1,x2) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<endl
#define debug_3(x1,x2,x3) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<endl
#define debug_4(x1,x2,x3,x4) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<endl
#define debug_5(x1,x2,x3,x4,x5) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<", "#x5<<": "<<x5<<endl
#define debug_6(x1,x2,x3,x4,x5,x6) cout<<#x1<<": "<<x1<<", "#x2<<": "<<x2<<", "#x3<<": "<<x3<<", "#x4<<": "<<x4<<", "#x5<<": "<<x5<<", "#x6<<": "<<x6<<endl
#ifdef _DEBUG
#define debug(...) CHOOSE((__VA_ARGS__,debug_6,debug_5,debug_4,debug_3,debug_2,debug_1,~))(__VA_ARGS__)
#else
#define debug(...)
#endif
#define rep(index,num) for(int index=0;index<(int)num;index++)
#define rep1(index,num) for(int index=1;index<=(int)num;index++)
#define brep(index,num) for(int index=(int)num-1;index>=0;index--)
#define brep1(index,num) for(int index=(int)num;index>0;index--)
#define scan(argument) cin>>argument
#define prin(argument) cout<<argument<<endl
#define kaigyo cout<<endl
#define eps 1e-7
#define mp(a1,a2) make_pair(a1,a2)
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
#define puba(a) emplace_back(a)
#define pubamp(a,b) emplace_back(mp(a,b))
typedef long long ll;
typedef long double ld;
using namespace std;
//using namespace atcoder;
typedef pair<ll,ll> pll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
typedef vector<pll> vpll;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
ll INFl=(ll)1e+18+1;
int INF=1e+9+1;
int main(){
	int N;
	ll X,A[101];
	scan(N>>X);
	rep(i,N) scan(A[i]);
	ll ans=INFl;
	rep1(chkosu,N){
		ll dp[101][101][100]={};//dp[i][j][mod]:i個目まで見てj個選んでいて魔力の総和%chkosuがmodであるような魔力の最大値
		rep(i,N+1) rep(j,chkosu+1) rep(mod,chkosu) dp[i][j][mod]=-INFl;
		dp[0][0][0]=0;
		rep(i,N){
			rep(j,chkosu+1){
				rep(mod,chkosu){
					if(j<chkosu) chmax(dp[i+1][j+1][(mod+A[i])%chkosu],dp[i][j][mod]+A[i]);
					chmax(dp[i+1][j][mod],dp[i][j][mod]);
				}
			}
		}
		ll canReachMaryokuMax=dp[N][chkosu][X%chkosu];
		debug(chkosu,canReachMaryokuMax,X%chkosu,(X-canReachMaryokuMax)/chkosu);
		if(canReachMaryokuMax<=0) continue;
		assert(canReachMaryokuMax<=X);
		chmin(ans,(X-canReachMaryokuMax)/chkosu);
	}
	prin(ans);
	return 0;
}
