#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
int n, m, a, c;
ll p;
ll gcd(ll a, ll b){
	for(; b; swap(a%=b,b));
	return a;
}
int main(){
	scanf("%d%d", &n, &m);
	rep(i,n){
		scanf("%d", &a);
		int t = 1;
		for(; a%2==0; a/=2) t *= 2;
		if(!i) c = t, p = a;
		p = a * p / gcd(a,p);
		if(p > m || t != c) return 0*puts("0");
	}
	printf("%lld\n", (m + p*c/2) / (p*c));
}