object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val m = sc.nextLong
  val seq = Seq.fill(n)(sc.nextLong)
  
  def gcd(a: Long, b: Long): Long = {
    if (b == 0) a
    else gcd(b, a % b)
  }
  
  def lcm(a: Long, b: Long) = a * b / gcd(a, b)
  def multiLcm(seq: Seq[Long]) = seq.reduce(lcm)

  val cm = multiLcm(seq.map(_ / 2)).toInt
  
  println(Stream.from(cm, cm * 2).takeWhile(_ <= m).size)
}