n, m = gets.split(" ").map(&:to_i)
a = gets.split(" ").map(&:to_i)
l = []
c = 0
until m < (a.max*c + a.max/2) do
  l << a.max*c + a.max/2
  c += 1
end
a.delete(a.max)

p l

l.each {|li|
  l2 =[]
  c2 = 0
  until m < (ai*c2 + ai/2) do
    l2 << ai*c2 + ai/2
    c2 += 1
  end
  l = l & l2
}
print l.uniq.length