var
n,k,i,j:longint;
max,tol:real;
f:array [0..100001] of real;
w,sum,z:array [0..100001] of longint;
begin
assign (input,'helpz.in');
assign (output,'helpz.out');
reset (input);
rewrite (output);
read (n,k);
for i:=1 to n do
begin
read (w[i]);
sum[i]:=w[i]+sum[i-1];
end;
for i:=n downto 1 do
if f[i+1]>w[i] then
begin
z[i]:=z[i+1];
f[i+1]:=(sum[z[i]]-sum[i-1])/(z[i]-i+1);
end
else
begin
z[i]:=i;
f[i]:=w[i];
end;
for i:=1 to n-k+1 do
begin
if (sum[i+k-1]-sum[i-1])/k<f[i+k] then max:=(sum[z[i+k]]-sum[i-1])/(z[i+k]-i+1)
else max:=(sum[i+k-1]-sum[i-1])/k;
if max>tol then tol:=max;
end;
writeln(trunc(tol*1000));
close (input);
close (output);
end.