#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define lli long long int   //used int to avoid mle
#define ulli unsigned long long int 
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define loop(i,a,b) for(lli i=a;i<b;i++)
#define initialize(array,size,value) for(lli i=0;i<size;i++) array[i]=value
#define couta(array,size) for(lli i=0;i<size;i++) cout<<array[i]<<" "
#define vl vector<lli>
#define vp vector< pair <lli,lli> >
#define sl set<lli>
#define spl set<pll>
#define msl multiset <lli>
#define msp multiset <pll>
#define pll pair<lli, lli>
#define mll map<lli, lli>              //for( map<lli, lli>::iterator i=temp.begin();i!=temp.end();i++)cout<<i->fi<<" "<<i->se<<endl;
#define mvl map<lli, vl>
#define umll unordered_map<lli, lli>
#define vt vector<pair<lli, pll >  >
#define vf vector<pair<pll,pll > >
#define qu queue<lli>
#define pq priority_queue<lli>
#define dq deque <lli>
#define ptr vector<lli>::iterator
#define bs(array,x) binary_search(array.begin(),array.end(),x)
#define lb(array,x) lower_bound(array.begin(),array.end(),x)
#define ub(array,x) upper_bound(array.begin(),array.end(),x)
#define nobw(array,i,j) upper_bound(array.begin(), array.end(), j)-lower_bound(array.begin(), array.end(), i) //number of numbers between i & j
#define vc clear()
#define endl '\n'
#define sp system("pause");
#define INF 9223372036854775807
#define MINF -9223372036854775808
#define start_routine() int begtime = clock();
#define end_routine() int endtime = clock(); cerr << endl << "Time elapsed: " << (endtime - begtime)*1000/CLOCKS_PER_SEC << " ms"; return 0
lli mod=1000000007;
//string s=bitset<32>(n).to_string();
lli ext_gcd (lli A, lli B, lli *X,lli *Y ){
    lli x2, y2, x1, y1, x, y, r2, r1, q, r;
    x2 = 1; y2 = 0;
    x1 = 0; y1 = 1;
    for (r2 = A, r1 = B; r1 != 0; r2 = r1, r1 = r, x2 = x1, y2 = y1, x1 = x, y1 = y ) {
        q = r2 / r1;
        r = r2 % r1;
        x = x2 - (q * x1);
        y = y2 - (q * y1);
    }
    *X = x2; *Y = y2;
    return r2;
}
pair<lli, lli> chinese_remainder_theorem( vector<lli> A, vector<lli> M ) {
    if(A.size() != M.size()) return {-1,-1}; /** Invalid input*/
 
    lli n = A.size();
 
    lli a1 = A[0];
    lli m1 = M[0];
    /** Initially x = a_0 (mod m_0)*/
 
    /** Merge the solution with remaining equations */
    for (lli i = 1; i < n; i++ ) {
        lli a2 = A[i];
        lli m2 = M[i];
 
        lli g = __gcd(m1, m2);
        if ( a1 % g != a2 % g ) return {-1,-1}; /** No solution exists*/
 
        /** Merge the two equations*/
        lli p, q;
        ext_gcd(m1/g, m2/g, &p, &q);
 
        lli mod = m1 / g * m2; /** LCM of m1 and m2*/
 
        /** We need to be careful about overflow, but I did not bother about overflow here to keep the code simple.*/
        lli x = (a1*(m2/g)*q + a2*(m1/g)*p) % mod;
 
        /** Merged equation*/
        a1 = x;
        if (a1 < 0) a1 += mod; /** Result is not suppose to be negative*/
        m1 = mod;
    }
    return {a1, m1};
}


int main()
{
 	ios::sync_with_stdio(0);
    cin.tie(0);
 
	//string s;
	//s="123";
	//lli x;
    lli n,k;
    cin>>n>>k;
   
    lli a[n];
    loop(i,0,n){
    	cin>>a[i];
    	a[i] = a[i] >> 1ll;
    }

    lli lc = a[0];
    for(lli i=1; i<n; i++){
    	lc = (lc/__gcd(lc, a[i]) * a[i]);
    }

    for(lli i=0; i<n; i++){
    	lli dfdf = lc/a[i];
    	if(dfdf % 2 == 0){
    		cout<<0<<endl;
    		return 0;
    	}
    }

    lli ans = k/lc;
    if(ans % 2 == 1) ans= (ans+1)/2;
    else ans = ans/2;
    cout<<ans<<endl;

}

Measured memory_bytes: 1024