#include <iostream>
#include <algorithm>

constexpr int N = 105;

int n;
long long x;
int a[N];
int f[N][N];

int main() {
    std::ios::sync_with_stdio(false), std::cin.tie(nullptr);
    std::cin >> n >> x;
    for (int i = 1; i <= n; ++i) std::cin >> a[i];
    long long ans = 1e18;
    for (int i = 1; i <= n; ++i) {
        for (int j = 0; j <= n; ++j)
            for (int k = 0; k < i; ++k)
                f[j][k] = -1;
        f[0][0] = 0;
        for (int pos = 1; pos <= n; ++pos)
            for (int j = i; j; --j)
                for (int k = 0; k < i; ++k)
                    if (~f[j - 1][k])
                        f[j][(k + a[pos]) % i] = std::max(f[j][(k + a[pos]) % i], f[j - 1][k] + a[pos]);
        if (~f[i][x % i]) ans = std::min(ans, (x - f[i][x % i]) / i);
    }
    std::cout << ans << '\n';
    return 0;
}

#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;

//#include <atcoder/all>
// using namespace atcoder;

#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repLRE(i, l, r) for (ll i = (l); i <= (r); ++i)
#define rrepLRE(i, l, r) for (ll i = (l); i >= (r); --i)
#define Sort(v) sort(v.begin(), v.end())
#define rSort(v) sort(v.rbegin(), v.rend())
#define Reverse(v) reverse(v.begin(), v.end())
#define Lower_bound(v, y) \
  distance(v.begin(), lower_bound(v.begin(), v.end(), y))
#define Upper_bound(v, y) \
  distance(v.begin(), upper_bound(v.begin(), v.end(), y))

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vP = vector<P>;
using vT = vector<T>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vvP = vector<vector<P>>;
using dqll = deque<ll>;

ll dx[9] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
ll dy[9] = {0, 0, -1, 1, -1, 1, -1, 1, 0};

template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

/* Macros reg. ends here */

const ll INF = 1LL << 50;

int main() {
  // ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);

  ll n, x;
  cin >> n >> x;

  vvvll dp(n + 1, vvll(n + 1, vll(n + 1, -1)));
  repLRE(i, 1, n) dp[0][i][0] = 0;
  rep(_, n) {
    ll a;
    cin >> a;
    vvvll ndp = dp;
    rep(i, n) repLRE(j, 1, n) rep(k, j) {
      if (dp[i][j][k] != -1) {
        ll ni = i + 1;
        ll nk = (dp[i][j][k] + a) % j;
        chmax(ndp[ni][j][nk], dp[i][j][k] + a);
      }
    }
    swap(ndp, dp);
  }

  ll ans = x;
  repLRE(i, 1, n) rep(k, i) {
    ll v = x - dp[i][i][k];
    if (dp[i][i][k] != -1 && v % i == 0) {
      ll tmp = v/i;
      chmin(ans, tmp);
    }
  }

  cout << ans << endl;

  return 0;
}
