program abc;
var
s,a:string;
n,i,sum:integer;
begin
writeln ('напишите текст : ');
read(s);
sum:=0;
n:=length(s);
for i:=1 to n do
a:=copy (s,i,1);
if a='a' then sum:=sum+1;
end;
writeln(sum);
end.
program abc;
var
s,a:string;
n,i,sum:integer;
begin
writeln ('напишите текст : ');
read(s);
sum:=0;
n:=length(s);
for i:=1 to n do
begin
a:=copy (s,i,1);
if a='a' then sum:=sum+1;
end;
writeln(sum);
end.