program task_5_48;
var n, x, count, max_count, i : integer;
begin
(* your code goes here *)
read(n);
count := 0;
max_count := 0;
for i:= 1 to n do begin
read(x);
writeln(x);
if x = 0 then count := count + 1
else begin
if max_count < count then begin
max_count := count;
end;
count := 0
end
end;
writeln('max_count = ', max_count)
end.
cHJvZ3JhbSB0YXNrXzVfNDg7CnZhciBuLCB4LCBjb3VudCwgbWF4X2NvdW50LCAgaSA6IGludGVnZXI7CmJlZ2luCgkoKiB5b3VyIGNvZGUgZ29lcyBoZXJlICopCglyZWFkKG4pOwoJY291bnQgOj0gMDsKCW1heF9jb3VudCA6PSAwOwoKCWZvciBpOj0gMSB0byBuIGRvIGJlZ2luCgkgICAgcmVhZCh4KTsKCSAgICB3cml0ZWxuKHgpOwoJICAgIGlmIHggPSAwIHRoZW4gY291bnQgOj0gY291bnQgKyAxCgkgICAgZWxzZSBiZWdpbgoJICAgICAgICBpZiBtYXhfY291bnQgPCBjb3VudCB0aGVuIGJlZ2luCgkgICAgICAgIG1heF9jb3VudCA6PSBjb3VudDsKCSAgICAgICAgZW5kOwoJICAgICAgICBjb3VudCA6PSAwCgkgICAgZW5kCgllbmQ7Cgl3cml0ZWxuKCdtYXhfY291bnQgPSAnLCBtYXhfY291bnQpCmVuZC4=