/* imports all std modules {{{*/
import
  std.algorithm,
  std.array,
  std.ascii,
  std.base64,
  std.bigint,
  std.bitmanip,
  std.compiler,
  std.complex,
  std.concurrency,
  std.container,
  std.conv,
  std.csv,
  std.datetime,
  std.demangle,
  std.encoding,
  std.exception,
  std.file,
  std.format,
  std.functional,
  std.getopt,
  std.json,
  std.math,
  std.mathspecial,
  std.meta,
  std.mmfile,
  std.net.curl,
  std.net.isemail,
  std.numeric,
  std.parallelism,
  std.path,
  std.process,
  std.random,
  std.range,
  std.regex,
  std.signals,
  std.socket,
  std.stdint,
  std.stdio,
  std.string,
  std.system,
  std.traits,
  std.typecons,
  std.uni,
  std.uri,
  std.utf,
  std.uuid,
  std.variant,
  std.zip,
  std.zlib;
/*}}}*/

/+---test
2 50
6 10
---+/
/+---test
3 100
14 22 40
---+/
/+---test
5 1000000000
6 6 2 6 2
---+/

void main(string[] args) {
  long N, M;
  readf(" %d %d ", &N, &M);

  const A = readln.split.map!(to!long).map!(x => x/2).array.sort!"a < b".uniq.array;

  if (A.canFind!(x => x%2 == 0)) {
    0.writeln;
    return;
  }

  long m = 1;
  foreach (a; A) {
    if (m > M/a) {
      0.writeln;
      return;
    }
    m *= a;
  }
  ((M/m+1)/2).writeln;
}
