N, M = gets.split.map(&:to_i)
as = gets.split.map(&:to_i)

mlcm = as[0].lcm(as[1])

as[1...as.length].each{|a|
  mlcm = mlcm.lcm(a)
}

if mlcm > M then
  ans = 0
else
  hlcm = mlcm / 2
  ans = M / hlcm / 2 + 1
end

puts ans
