#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include<iostream>
using namespace std;

#define int long long int
#define double long double

#define all(x) (x).begin(), (x).end()
#define RemoveDuplicates(a) a.resize(unique(all(a))-a.begin())
#define Debug(x) cerr<<"["<<#x<<": "<<x<<"]"
#define endl '\n'

void solve(){
	int n,x;
	cin>>n>>x;
	vector<int>a(n);
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	map<int,int>cnt;
	cnt[x]=1;
	for(int i=0;i<n-1;i++){
		map<int,int>newcnt;
		int d=a[i+1]/a[i];
		for(pair<int,int>p:cnt){
			int val=p.first;
			int count=p.second;
			if(val%d!=0){
				newcnt[val/d+1]+=count;
			}
			newcnt[val/d]+=count;
		}
		cnt=newcnt;
	}
	int ans=0;
	for(pair<int,int>p:cnt){
		ans+=p.second;
	}
	cout<<ans<<endl;
}

int32_t main(){

	// Remove for Interactive Problems
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);

	solve();
	cerr<<"Time : "<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<"ms\n";

	return 0;
}
#include <bits/stdc++.h>
using namespace std;
// #define LOCAL // 提出時はコメントアウト
#define DEBUG_

typedef long long ll;
const double EPS = 1e-9;
const ll INF = ((1LL<<62)-(1LL<<31));
typedef vector<ll> vecl;
typedef pair<ll, ll> pairl;
template<typename T> using uset = unordered_set<T>;
template<typename T, typename U> using mapv = map<T,vector<U>>;
template<typename T, typename U> using umap = unordered_map<T,U>;

#define ALL(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define contains(S,x) find(ALL(S),x) != S.end()
ll llceil(ll a,ll b) { return (a+b-1)/b; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> vector<vector<T>> genarr(ll n, ll m, T init) { return vector<vector<T>>(n,vector<T>(m,init)); }

///// DEBUG
#define DUMPOUT cerr
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
template<typename T>istream&operator>>(istream&is,vector<T>&vec){for(T&x:vec)is>>x;return is;}
template<typename T,typename U>ostream&operator<<(ostream&os,pair<T,U>&pair_var){os<<"("<<pair_var.first<<", "<<pair_var.second<<")";return os;}
template<typename T>ostream&operator<<(ostream&os,const vector<T>&vec){os<<"{";for(int i=0;i<vec.size();i++){os<<vec[i]<<(i+1==vec.size()?"":", ");}
os<<"}";return os;}
template<typename T,typename U>ostream&operator<<(ostream&os,map<T,U>&map_var){os<<"{";repi(itr,map_var){os<<*itr;itr++;if(itr!=map_var.end())os<<", ";itr--;}
os<<"}";return os;}
template<typename T>ostream&operator<<(ostream&os,set<T>&set_var){os<<"{";repi(itr,set_var){os<<*itr;itr++;if(itr!=set_var.end())os<<", ";itr--;}
os<<"}";return os;}
void dump_func(){DUMPOUT<<endl;}
template<class Head,class...Tail>void dump_func(Head&&head,Tail&&...tail){DUMPOUT<<head;if(sizeof...(Tail)>0){DUMPOUT<<", ";}
dump_func(std::move(tail)...);}
#ifndef LOCAL
#undef DEBUG_
#endif
#ifdef DEBUG_
#define DEB
#define dump(...)                                                          \
DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
        << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
        << endl                                                            \
        << "    ",                                                         \
    dump_func(__VA_ARGS__)
#else
#define DEB if (false)
#define dump(...)
#endif

//////////

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

vecl A;
vector<umap<ll,ll>> memo(60);
ll solve(ll x, int i) {
    if (i >= A.size() - 1) return 1;
    if (memo[i].count(x) > 0) return memo[i][x];
    if (x % A[i+1] == 0) return memo[i][x] = solve(x, i+1);

    return memo[i][x] = solve(x - x % A[i+1], i+1) + solve(x - x % A[i+1] + A[i+1], i+1);
}

int main() {
    #ifdef LOCAL
    ifstream in("../../Atcoder/input.txt");
    cin.rdbuf(in.rdbuf());
    #endif

    ll N,X;
    cin>>N>>X;

    A.resize(N);
    rep(i,N) cin>>A[i];

    ll ans = solve(X,0);
    cout << ans << endl;

    return 0;
}
