#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
using ll=long long;
using namespace std;
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }
ll a[110000];
int main(){
  ll n,m,ans=0,sum=1,cnt=0;
  cin>>n>>m;
  rep(i,0,n){cin>>a[i];a[i]/=2;}
  bool fuck=true;
  rep(i,0,n)sum=sum/GCD(sum,a[i])*a[i];
  ll k=1;
  while(sum*k<=m){ans++,k+=2;}
  rep(i,0,n){
    if((sum/a[i])%2==0)fuck=false;
  }
  if(fuck)cout<<ans;
  else cout<<0;
}