#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using WGraph = vector<vector<pair<int, ll>>>;

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

constexpr int INF = 1e9;
constexpr int MOD = 1e9 + 7;
constexpr long long LINF = 1e18;
constexpr double EPS = 1e-10;
constexpr double PI = M_PI;

void solve() {
    int N;
    ll X;
    cin >> N >> X;
    vector<ll> A(N);
    for (int i=0; i<N; ++i) cin >> A[i];

    vector<ll> diff(N);
    for (int i=0; i<N-1; ++i) diff[i] = A[i+1] / A[i];

    vector<ll> XX(N);
    for (int i=N-1; i>=0; --i) {
        XX[i] = X / A[i];
        X %= A[i];
    }

    ll ans = 1;
    for (int i=0; i<N-1; ++i) {
        if (XX[i] == 0) continue;
        vector<vector<ll>> cnt(N, vector<ll>(2));
        cnt[i+1][1] = 1;
        for (int j=i+1; j<N-1; ++j) {
            // up
            cnt[j+1][1] += cnt[j][1];
            if (XX[j] + 1 < diff[j]) cnt[j+1][0] += cnt[j][1];
            // no up
            if (XX[j] != 0) cnt[j+1][1] += cnt[j][0];
            cnt[j+1][0] += cnt[j][0];
        }
        ans += cnt[N-1][0] + cnt[N-1][1];
    }
    cout << ans << '\n';
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    solve();

    return 0;
}

//include <atcoder>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <tuple>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#define flush fflush(stdout)
#define endl '\n'
#define all(v) v.begin(), v.end()
#define pf(dans) printf("%.12lf", dans)
#define pfn(dans) pf(dans); cout << endl;
using namespace std;
//using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
const int mod1 = (int)1e9 + 7, mod2 = (int)998244353;
const int INF = (int)1e9 + 10;
const ll LINF = (ll)1e18 + 10;
const int di[8] = {1, 0, -1, 0, 1, 1, -1, -1}, dj[8] = {0, 1, 0, -1, -1, 1, -1, 1};

#define rep0(i, n) for (i = 0; i < n; i++)
#define rep1(i, a, b) for (i = a; i < b; i++)
#define reprev(i, n) for (i = n - 1; i >= 0; i--)

template <typename T>
T my_abs(T x){
    return (x >= 0)? x : -x;
}

template <typename T>
void chmax(T &a, T b){
    a = max(a, b);
}

template <typename T>
void chmin(T &a, T b){
    a = min(a, b);
}

ll gcd(ll a, ll b){
    if (a > b) return gcd(b, a);
    if (a == 0) return b;
    return gcd(b % a, a);
}

bool incld_bit(ll bit, int i){
    return ((bit>>i) & 1) == 1;
}

// --------------------------------------------------------------------------------

int main(void){
    int i, j;
    int n;
    ll x;
    ll a[53];

    cin >> n >> x;
    rep0(i, n){
        cin >> a[i];
    }
    a[n] = LINF;

    map<ll, ll> dp[53];
    dp[n][0] = 1;
    reprev(i, n){
        dp[i][x / a[i] * a[i]] = 0;
        dp[i][(x + a[i] - 1) / a[i] * a[i]] = 0;
        for (auto &p1: dp[i]){
            for (auto p2: dp[i + 1]){
                if (my_abs(p1.first - p2.first) < a[i + 1]){
                    p1.second += p2.second;
                }
            }
        }
    }

    cout << dp[0][x] << endl;

    return 0;
}