1) на pascal ABC
var i:integer;
n:real;
a:string;
begin
readln(a);
for i:=1 to length(a) do
if a[i]='a' then n+=1;
n:=(n/length(a)*100);
writeln(n:2:1);
end.
2) на pascal ABC
var i,n:integer;
a:string;
begin
readln(a);
for i:=1 to length(a) do
if (a[i]='p') and (a[i+1]='o') then n+=1;
writeln(n);
end.