var
n,m,i,j,min,temp,a:longint;
mi:array[0..100000] of longint;
procedure kp(s,t:longint);
var
i,j,x:longint;
begin
i:=s;j:=t; x:=mi[(i+j)div 2];
repeat
while mi[i]<x do inc(i);
while mi[j]>x do dec(j);
if i<=j then
begin
temp:=mi[i];mi[i]:=mi[j];mi[j]:=temp;
inc(i); dec(j);
end;
until i>j;
if s<j then kp(s,j);
if i<t then kp(i,t);
end;
begin
assign(input,'battle.in');
assign(output,'battle.out');
reset(input);
rewrite(output);
read(n,m);
for i:=1 to n do read(mi[i]);
kp(1,n);
temp:=mi[1]-m;
if m>mi[1] then temp:=0;
min:=10000000;
for i:=2 to n do
begin
a:=(mi[i]-temp) div (i-1);
if min>a then min:=a;
end;
write(min);
close(input);
close(output);
end.