let rec gcd n m =
  if m = 0 then n
  else gcd m (n mod m)

let lcm n m = n / gcd n m * m

let () = Scanf.scanf "%d %d\n" @@ fun n m ->
  let as_ = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a / 2 in
  Printf.printf "%d\n" @@
  try
    let lcm = Array.fold_left (fun ans a ->
      let ans' = lcm ans a in
      (if
        m < ans ||
        (ans' / a) mod 2 = 0 ||
        (ans' / ans) mod 2 = 0
      then raise Not_found); ans') 1 as_ in
    (m / lcm + 1) / 2
  with Not_found -> 0



