var
n,k,i,l,ans:longint;
s:ansistring;
begin
assign(input,'tenshi.in');
reset(input);
assign(output,'tenshi.out');
rewrite(output);
readln(n,k);
readln(s);
for i:=1 to n do
s:=s+'0';
s:=s+'.';
repeat
ans:=0;
i:=1;
repeat
while s[i]='0' do inc(i);
if s[i]='.' then break;
i:=i+l;
inc(ans);
until (s[i]='.')or(ans>k);
if ans<=k then
begin
writeln(l);
exit;
end;
inc(l);
until 1>2;
close(input);close(output);
end.