#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <deque>
#include <array>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cassert>
#include <chrono>
#include <random>
#include <limits>
#include <iterator>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <cstring>
#include <unordered_map>
using namespace std;

using ll = long long;
using P = pair<int, int>;
constexpr int INF = 1001001001;
constexpr int mod = 1000000007;
// constexpr int mod = 998244353;

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

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

    int N;
    ll X;
    cin >> N >> X;
    vector<ll> A(N), dp(2), x(N), bound(N);
    for(int i = 0; i < N; ++i)  cin >> A[i];
    for(int i = N - 1; i >= 0; --i){
        x[i] = X / A[i];
        X %= A[i];
    }
    for(int i = 0; i + 1 < N; ++i)  bound[i] = A[i + 1] / A[i];
    bound[N - 1] = 1e+17;
    dp[0] = 1;
    for(int i = 0; i < N; ++i){
        vector<ll> dp2(2);
        for(int j = 0; j < 2; ++j){
            for(int k = 0; k < 2; ++k){
                // x[i] + z + j = y + k * val[i]
                // y = 0
                ll z = 0 + bound[i] * k - x[i] - j;
                if(0 <= z && z < bound[i])  dp2[k] += dp[j];
                // z = 0
                ll y = x[i] + 0 + j - bound[i] * k;
                if(0 < y && y < bound[i])   dp2[k] += dp[j];
            }
        }
        swap(dp, dp2);
    }
    cout << dp[0] << endl;
}
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;
//using namespace atcoder;
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vp = vector<P>;
using vvp = vector<vp>;

#define INF 1001001001
#define MAX 200010

const int mod = 1000000007;

int n;
vl a;

vl div(ll x) {
  vl res(n);
  for (int i = n-1; i >= 0; i--) {
    res[i] = x/a[i];
    x %= a[i];
  }
  return res;
}
int main() {
  ll x;
  cin >> n >> x;
  a.resize(n);
  rep(i,n) cin >> a[i];
  vl vx = div(x);
  vl dp(n);
  rep(i,n-1) if (vx[i]) dp[i]++;
  rep(i,n-1) {
    vl v = div(x+a[i+1]);
    int idx = i+1;
    while (!v[idx]) idx++;
    for (int j = idx; j < n-1; j++) if (v[j]) dp[j]+=dp[i];
  }
  ll ans = 1;
  rep(i,n) ans += dp[i];
  cout << ans << endl;

  return 0;
}