#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
#include<queue>
using namespace std;
typedef long long ll;

ll a[100],b[100];

int main()
{
    ll n,x,i,j;
    scanf("%lld%lld",&n,&x);
    for(i=0;i<n;i++)
        scanf("%lld",&a[i]);
    for(i=n-1;i>=0;i--)
    {
        b[i]=x/a[i];
        x%=a[i];
    }
    ll ci=1,k=0,h;
    for(i=0;i<n;i++)
    {
        h=ci;
        if((b[i]+1)*a[i]!=a[i+1])
            ci+=k;
        if(b[i]!=0)
            k+=h;
    }
    printf("%lld\n",ci);
    return 0;
}

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

int main() {
	int N;
	long long X;
	cin >> N >> X;
	vector<long long>A(N);
	for (int i = 0; i < N; ++i) {
		cin >> A[i];
	}
	vector<vector<long long>> dp(N + 1, vector<long long>(2, 0));
	dp[0][0] = 1;
	for (int i = 0; i < N; ++i) {
		for (int j = 0; j < 2; ++j) {
			long long d = (X / A[i] + j);
			if (i != N - 1) {
				d %= (A[i + 1] / A[i]);
			}
			if (0 == d) {
				dp[i + 1][j] += dp[i][j];
			}
			else {
				dp[i + 1][0] += dp[i][j];
				dp[i + 1][1] += dp[i][j];
			}
		}
	}
	cout << dp[N][0] << endl;
	return 0;
}