n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
ha = a.map { |x| x / 2 }

a_lcm = 1
ha_lcm = 1
n.times do |y|
  a_lcm = a_lcm.lcm(a[y])
  ha_lcm = ha_lcm.lcm(ha[y])
end

count = m >= ha_lcm ? 1 : 0
count += (m - ha_lcm) / a_lcm
puts count < 0 ? 0 : count