n,m = gets.chomp.split.map(&:to_i)
a = gets.chomp.split.map(&:to_i).sort
a.map!{|x| x/=2}
l = a[0]
for i in 1..n-1
    if l<m
        l = l.lcm(a[i])
    else
        puts 0
        exit
    end
end

ans = (m-l)/(l*2)+1

puts ans