local function gcd(a,b)if(a>b)then a,b=b,a end while(a~=0)do a,b=b%a,a end return b end
local function lcm(a,b)return a/gcd(a,b)*b end
N=io.read"*n"
M=io.read"*n"
a={}
for i=1,N do
	table.insert(a,io.read"*n"/2)
end
l=a[1]
for i=2,N do
	l=lcm(l,a[i])
end

print(math.floor(M/l)-math.floor(M/(l+l)))