uses math;
const oo=1000000000;
var n,i,j:longint;
max,s:longint;
a: array[1..1000] of longint;
f: array[0..1000] of longint;
begin
readln(n,s);
max:=-oo;
for i:=1 to n do
begin
read(a[i]);
if a[i]>max then max:=a[i];
end;
f[0]:=s div max-1;
s:=s mod max+max;
for i:=1 to s do
begin
f[i]:=oo;
for j:=1 to n do
if a[j]<=i then
if f[i-a[j]]+1<f[i] then f[i]:=f[i-a[j]]+1;
end;
writeln(f[s]);
end.
dXNlcyBtYXRoOwpjb25zdCBvbz0xMDAwMDAwMDAwOwp2YXIgbixpLGo6bG9uZ2ludDsKICAgIG1heCxzOmxvbmdpbnQ7CiAgICBhOiBhcnJheVsxLi4xMDAwXSBvZiBsb25naW50OwogICAgZjogYXJyYXlbMC4uMTAwMF0gb2YgbG9uZ2ludDsKYmVnaW4KICByZWFkbG4obixzKTsKICBtYXg6PS1vbzsKICBmb3IgaTo9MSB0byBuIGRvCiAgYmVnaW4KICAgIHJlYWQoYVtpXSk7CiAgICBpZiBhW2ldPm1heCB0aGVuIG1heDo9YVtpXTsKICBlbmQ7CiAgZlswXTo9cyBkaXYgbWF4LTE7CiAgczo9cyBtb2QgbWF4K21heDsKICBmb3IgaTo9MSB0byBzIGRvCiAgYmVnaW4KICAgIGZbaV06PW9vOwogICAgZm9yIGo6PTEgdG8gbiBkbwogICAgaWYgYVtqXTw9aSB0aGVuCiAgICBpZiBmW2ktYVtqXV0rMTxmW2ldIHRoZW4gZltpXTo9ZltpLWFbal1dKzE7CiAgZW5kOwogIHdyaXRlbG4oZltzXSk7CmVuZC4g