program fireshow;
var f:array[1..2000000] of boolean;
i,j,k,c,n:longint;
t:array[1..100] of longint;
begin
assign(input,'fireshow.in');reset(input);
assign(output,'fireshow.out');rewrite(output);
readln(c,n);
for i:=1 to c do readln(t[i]);
fillchar(f,sizeof(f),false);
for i:=1 to c do
begin
k:=t[i];
while k<=n do
begin
if not f[k] then
begin inc(j); f[k]:=true; end;
k:=k+t[i];
end;
end;
writeln(j);
close(input);
close(output);
end.