object Main extends App{
  def f(a:Int, m:Int): Set[Int] ={
    (1 to (m/a-0.5).toInt).map( x => a*(x+0.5) ).map(_.toInt).toSet
  }
  
  val List(n,m) = readLine.split(" ").map(_.toInt).toList
  val a = readLine.split(" ").map(_.toInt).toSet
  println(a.map(a => f(a,m)).reduce( (x1,x2) => x1&x2  ).size)
}