#include <iostream>
#include<vector>
#include<algorithm>
 
using namespace std;
 
int gcd(int a,int b)
{
	if (a%b==0)
	{
		return(b);
    }
	else
	{
		return(gcd(b,a%b));
    }
}
 
int main(){
  int n; cin >> n;
  long long int m; cin >> m;
  vector<long long int> a(n); 
  for(int i=0;i<n;i++) cin >> a[i];
  long long int lc = 1;
  for(int i=0;i<n;i++){
    a[i] = a[i] / 2;
  	long long int t = gcd(lc, a[i]);
    lc = (lc * a[i]) / t;
  }
  for(int i=0;i<n;i++) if((lc / a[i]) % 2 ==0){cout << 0 << endl; return 0;}
  
  cout << (m / lc + 1) / 2 << endl;
  return 0;
}
