var stroka:string; i, max, tmp:integer; begin read(stroka); max:=0; tmp:=0; for i:=1 to length(stroka)do begin if stroka[i]='a' then tmp:=tmp+1 else begin if tmp>max then max:=tmp; tmp:=0; end; end; writeln(max); end.
Яндекс