import std.stdio, std.conv, std.string, std.algorithm,
       std.math, std.array, std.container, std.typecons;

import std.numeric;
long n, m;

bool[] isprime;

void main() {
  readf("%d %d\n", &n, &m);
  long[] a = readln.chomp.split.to!(long[]);
  for(long i=0; i<n; i++) a[i] /= 2;
  long lcm = a[0];
  for(long i=1; i<n; i++) lcm = a[i] / gcd(lcm, a[i]) * lcm;
  long count = 0;
  for(long i=lcm+1; i<=m; i+=2*lcm) count++;
  count.writeln();
}

