#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

#define int ll
const int N = 50 + 7;
int n;
int y;
int a[N];
int b[N];
int valuey[N];
int dp[N][2];

signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);

  cin >> n >> y;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[n + 1] = (int) 3e18 / a[n] * a[n];
  for (int i = 1; i <= n; i++) {
    b[i] = a[i + 1] / a[i];
  }
  for (int i = n; i >= 1; i--) {
    valuey[i] = y / a[i];
    y %= a[i];
  }
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= 1; j++) {
      dp[i][valuey[i] + j >= b[i]] += dp[i - 1][j];
      int value = dp[i - 1][j];
      int x = b[i] - j - valuey[i];
      if (1 <= x && x < b[i]) {
        dp[i][(x + j + valuey[i]) >= b[i]] += value;
      }
    }
  }
  cout << dp[n][0] << "\n";
}




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

typedef long long lli;
int MOD = 998244353;
inline int add(const int a, const int b, const int mod = MOD) { return (a + b >= mod) ? (a + b - mod) : (a + b); }
inline void _add(int &a, const int b, const int mod = MOD) { a = add(a, b, mod); }
inline int sub(const int a, const int b, const int mod = MOD) { return (a - b < 0) ? (a - b + mod) : (a - b); }
inline void _sub(int &a, const int b, const int mod = MOD) { a = sub(a, b, mod); }
inline int negate(const int a, const int mod = MOD) { return mod - a; }
inline int mul(const int a, const int b, const int mod = MOD) { return (a * 1ll * b) % mod; }
inline void _mul(int &a, const int b, const int mod = MOD) { a = mul(a, b, mod); }
int binPow(int b, lli p, const int mod = MOD) {
	int r = 1;
	while (p) {
		if (p & 1) r = mul(r, b, mod);
		b = mul(b, b, mod);
		p >>= 1;
	}
	return r;
}
int gcdex(int a, int b, int &x, int &y) {
	if (!b) return x = 1, y = 0, a;
	int px, py, res = gcdex(b, a % b, px, py);
	return x = py, y = px - a / b * py, res;
}
int inv(const int a, const int mod = MOD) { // a and mod must be coprime
	int x, y;
	int g = gcdex(a, mod, x, y);
	assert(g == 1);
	x = (x % mod + mod) % mod;
	return x;
}
inline int dvd(const int a, const int b, const int mod = MOD) { // b and mod must be coprime
	int rev = inv(b, mod);
	return mul(a, inv(b, mod), mod);
} // b != 0
inline void _dvd(int &a, const int b, const int mod = MOD) { a = dvd(a, b, mod); } // b and mod must be coprime
inline int convert(int x, const int mod = MOD) {
	int tx = x % mod + mod;
	return tx >= mod ? tx - mod : tx;
};

const int MB = 13;
const int MX = 5005;
vector<int> f, rf;
vector<vector<int>> dp;
int n, m;
int C(int n, int k) {
    if (k < 0 || k > n) return 0;
    return mul(f[n], mul(rf[k], rf[n - k]));
}

int getDp(int sum, int bit) {
    if (sum == 0) return 1;
    if (bit == -1) return 0;
    if (dp[sum][bit] != -1) return dp[sum][bit];

    int one = 1 << bit;
    dp[sum][bit] = 0;
    for (int take = 0; 1ll * take * one <= sum && take <= n; take += 2) {
        _add(dp[sum][bit], mul(C(n, take), getDp(sum - take * one, bit - 1)));
    }
    return dp[sum][bit];
}

int main () {
    f.assign(MX, 0);
    rf.assign(MX, 0);
    f[0] = 1;
    for (int i = 1; i < MX; i++) f[i] = mul(f[i - 1], i);
    rf[MX - 1] = 996779413;
    for (int i = MX - 2; i >= 0; i--) rf[i] = mul(rf[i + 1], i + 1);

    while (scanf("%d %d", &n, &m) == 2) {
        dp.assign(m + 1, vector<int>(MB + 1, -1));
        int res = getDp(m, MB);
        printf("%d\n", res);
    }
}



