program Belozor7 var f1 f2 text res integer string begin assign f1 inp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
program Belozor7;
var f1,f2:text;
res,n, i:integer;
a:string;
begin
assign(f1, 'input.txt');
assign (f2,'output.txt');
reset(f1);
rewrite(f2);
read(f1,a);
for i :=0 to 255 do begin
if a[i]='a' then inc (n)
else begin
if res<n then res:=n;
n:=0
end;
end ;
write(f2,res);
close (f1);
close(f2);
end.