#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using db = double;
using vi = vector<int>;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define debug(x) cout << #x << '	' << x <<endl
const int inf = 0x3f3f3f3f;
const db eps = 1e-8;
const int mod = 998244353;
ll qpow(ll a, ll b){
    ll ret = 1;
    while(b){
        if(b&1)ret = ret*a%mod;
        a = a*a%mod;
        b>>=1;
    }
    return ret;
}
const int maxn = 3100;
int n, k;
int dp[maxn][maxn<<1];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> k;
    dp[0][0] = 1;
    for(int i=1; i<=n; ++i){
        for(int k=i; k>0; k--){
            dp[i][k] = (dp[i-1][k-1]+dp[i][2*k])%mod;
        }
    }
    cout << dp[n][k]%mod <<"\n";
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
using gg = long long;
// MAX
// constexpr gg MAX = 25;
constexpr gg MAX = 1e2 + 5;
constexpr gg mod = 1e9 + 7;
constexpr gg INF = LONG_LONG_MAX / 2;
constexpr double thre = 1e-7;
gg ti, ni, mi, ki, di, pi, xi, yi;
gg v[MAX];
gg dp[MAX][MAX][MAX];
gg dfs(gg p, gg m, gg k, gg s) {
    if (k == 0) {
        return m == 0 ? 0 : -INF;
    }
    if (p == ni) {
        return -INF;
    }
    auto& ans = dp[p][m][k];
    if (ans != LONG_LONG_MIN) {
        return ans;
    }
    return ans = max(dfs(p + 1, m, k, s),
                     dfs(p + 1, (m + s - v[p] % s) % s, k - 1, s) + v[p]);
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> ni >> xi;
    for (gg i = 1; i <= ni; ++i) {
        cin >> v[i];
    }
    gg ans = INF;
    for (gg s = 1; s <= ni; ++s) {
        for (gg i = 0; i <= ni; ++i) {
            for (gg j = 0; j <= s; ++j) {
                for (gg k = 0; k <= s; ++k) {
                    dp[i][j][k] = -INF;
                }
            }
        }
        dp[0][0][0] = 0;
        for (gg i = 1; i <= ni; ++i) {
            for (gg j = 0; j <= s; ++j) {
                for (gg k = 0; k < s; ++k) {
                    dp[i][j][k] = dp[i - 1][j][k];
                    if (j > 0 and
                        dp[i - 1][j - 1][(k - v[i] % s + s) % s] != -INF) {
                        dp[i][j][k] = max(
                            dp[i][j][k],
                            dp[i - 1][j - 1][(k - v[i] % s + s) % s] + v[i]);
                    }
                }
            }
        }
        if (dp[ni][s][xi % s] != -INF)
            ans = min(ans, (xi - dp[ni][s][xi % s]) / s);
    }
    cout << ans;
    return 0;
}