n,m = gets.chomp.split().map(&:to_i)
a = gets.chomp.split().map(&:to_i)

a.sort!
even = (a.first/2).even?
if a.any?{|e| (e/2).even?}
  puts 0
  exit
end

num = 1
a.each do |e|
  num = num * [e /2, 2].max
end

if m - num < 0
  puts 0
else
  m -= num
  puts m/num
end
