#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
const long long MOD = 1e9 + 7;
const int M = 61;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  while (b > 1) {
    a %= b;
    swap(a, b);
  }
  return a;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
int main() {
  int n;
  long long m;
  cin >> n >> m;
  int ans = 1e8;
  long long lc = 1;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    if (i == 0)
      lc = a;
    else
      lc = lcm(lc, a / 2);
  }
  cout << (long long)ceil(max((double)(m - lc / 2ll), 0.) / (double)lc);
}
