#include<bits/stdc++.h>
long long n,x;
long long ans[2],k[2],a,b,c,now;
int main() 
{
	scanf("%lld%lld",&n,&x);
	scanf("%lld",&b);
	ans[0]=1;ans[1]=0;
	for(int i=1;i<n;++i) 
	{
		scanf("%lld",&a);
		c=a/b;b=a;
		now=x%c;
		x/=c;
		k[0]=ans[0],k[1]=ans[1];
		if(now)k[1]+=ans[0];
		if(++now!=c)k[0]+=ans[1];
		ans[0]=k[0];ans[1]=k[1];
	}
	printf("%lld",ans[0]+ans[1]);
	return 0;	  
} 
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int gcd(int x, int y) { return (x % y)? gcd(y, x % y): y; }    //最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }     //最小公倍数
using Graph = vector<vector<int>>;
ll inf=300000000000000000;
const double PI = 3.14159265358979323846;
int main(){
  int n;
  ll x;
  cin >> n >> x;
  if(n==1){
    cout << 1 << endl;
    return 0;
  }
  ll a[n];
  rep(i,n)cin >> a[i];
  ll k[n];
  rep(i,n)k[i]=0;
  rep(i,n-1){
    k[i]=(x%a[i+1])/a[i];
    x=(x/a[i+1])*a[i+1];
  }
  k[n-1]=x/a[n-1];
  ll dp[n][3];
  rep(i,n)rep(j,3)dp[i][j]=0;
  if(k[0]!=0)dp[0][0]=1;
  dp[0][1]=1;
  rep(i,n-1){
    if(k[i+1]==0){
      dp[i+1][0]=dp[i][0];
      dp[i+1][1]=dp[i][1]+dp[i][2];
      dp[i+1][2]=dp[i][0];
    }
    else{
    dp[i+1][0]=dp[i][0]+dp[i][1]+dp[i][2];
    dp[i+1][1]=dp[i][1]+dp[i][2];
    if(i!=n-2){
      if(a[i+2]/a[i+1]==k[i+1]+1)dp[i+1][2]=0;
      else dp[i+1][2]=dp[i][0];
    }
    else dp[i+1][2]=dp[i][0];
    }
  }
  cout << dp[n-1][1]+dp[n-1][2] << endl;
  //rep(i,n)cout << dp[i][0] << " " << dp[i][1] << " " << dp[i][2] << endl;
}