https://www.acmicpc.net/problem/1773
n,num=map(int,input().split())
arr=[0]*n
f=[0]*num
for i in range(n):
arr[i]=int(input())
for i in range(n):
for j in range(1,num+1):
if j%arr[i]==0: f[j-1]+=1;
count=0
for i in range(num):
if f[i]>0: count+=1
print(count)