object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val m = sc.nextInt
  val as = Seq.fill(n)(sc.nextInt)
  
  val seq = for {
    e <- Range(1, m, 2)
    if as.forall{ x => (e - x / 2) % x == 0 }
  } yield {e}
  
  println(seq.length)
}