var
a,c1:array[1..200]of longint;
b:array[0..2000000]of char;
c,ti,n,z,y,i:longint;
begin
assign(input,'fireshow.in');
assign(output,'fireshow.out');
reset(input);
rewrite(output);
read(c,n);
for i:=1 to c do
read(a[i]);
for i:=1 to c do
begin
y:=0;
while y<=n do
begin
b[y]:='1';
y:=y+a[i];
end;
end;
for i:=1 to n do
if b[i]='1' then z:=z+1;
write(z);
close(input);
close(output);
end.