let rec gcd a b =
  let r = a mod b in
  if r = 0 then b
  else gcd b r

let () =
  Scanf.scanf "%d %d" @@ fun n m ->
  let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a / 2)) in
  let lcm = Array.fold_left
      (fun lcm a ->
        let t = lcm / (gcd lcm a) * a in
        if m < t then 0
        else t
      ) 1 a in
  let b = Array.exists (fun a -> lcm / a mod 2 = 0) a in
  let ans = if b then 0 else (m / lcm - 1) / 2 + 1 in
  Printf.printf "%d\n" ans
