#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
constexpr ll INF = 1e18+7;
int n, a[105];
ll x, dp[2][105][105], ans = INF;
int main(){
	scanf("%d%lld", &n, &x);
	rep(i,n) scanf("%d", a+i);
	for(int i=1; i<=n; i++){
		fill(dp[0][0], dp[1][n], -INF);
		dp[1][0][0] = 0;
		rep(j,n) rep(k,i) rep(l,i+1){
			dp[j&1][(k+a[j])%i][l+1] = max(dp[j&1][(k+a[j])%i][l+1], dp[j&1^1][k][l] + (k+a[j])/i);
			dp[j&1][k][l] = max(dp[j&1][k][l], dp[j&1^1][k][l]);
		}
		ans = min(ans, x/i - dp[n&1^1][x%i][i]);
	}
	printf("%lld\n", ans);
}
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include <stdio.h>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <iomanip> //setprecision
#include <map> // map
#include <unordered_map> //unordered_map
#include <queue> // queue, priority_queue
#include <set> // set,multiset
#include <stack> // stack
#include <deque> // deque
#include <math.h>//pow,,,
#include <cmath>//abs,,,
#include <bitset> // bitset
#include <numeric> //accumulate,,,
#include <sstream>
//#define endl "\n";
using namespace std;

using PLL = pair<long long,long long>;
typedef tuple<long long,long long,long long> TUP;
using P = pair<int,int>;
const long long INF = 4000000000000000001;
const int inf = 1001001001;
const long long MOD = 1000000007;

// dp[i][j][k]: i番目までj個(0≤j≤cnt)選んでmod cntでkとなる時の必要魔力の最小値
vector<vector<vector<long long>>> dp(105,vector<vector<long long>>(105,vector<long long>(105)));

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

    int N;cin >> N;
    long long X;cin >> X;
    vector<long long> a(N);
    for(int i = 0;i<N;i++) cin >> a.at(i);
    // sum(a) ≤ X
    //for(int i = 0;i<101;i++) for(int j = 0;j<101;j++) for(int k = 0;k<101;k++) dp[i][j][k] = INF;

    long long ans = INF;
    for(int cnt = 1;cnt<=N;cnt++){
        for(int i = 0;i<105;i++) for(int j = 0;j<105;j++) for(int k = 0;k<105;k++) dp[i][j][k] = -1;
        dp[0][0][0] = 0;

        for(int i = 0;i<N;i++){
            for(int j = 0;j<N;j++){
                for(int k = 0;k<cnt;k++){
                    // i個目を選ぶ
                    int nextMOD = (k + a.at(i))%cnt;
                    if(dp[i][j][k] != -1)dp[i+1][j+1][nextMOD] = max(dp[i+1][j+1][nextMOD] , dp[i][j][k]+a.at(i));
                    // i個目を選ばない
                    dp[i+1][j][k] = max(dp[i+1][j][k] , dp[i][j][k]);
                    //cout << cnt << " " << nextMOD << " " << dp[i+1][j+1][nextMOD] << endl;
                }
            }
        }
        // cnt個選んで、k+(cnt*?)=Xにならないといけない
        long long res = dp[N][cnt][X%cnt];
        if(res == -1) continue;
        //cout << cnt << " " << res << " " << " " << X%cnt << " " << ((X-res)/cnt)*cnt + res << endl;
        
        ans = min(ans,((X-res)/cnt));
    }

    cout << ans << endl;
}