var
kol,i:integer;
s:string;
begin
readln(s);
kol:=0;
For i:=1 to Length(s) do
if (s[i]='А') or (s[i]='Б') or (s[i]='В') then
kol:=kol+1;
writeln(kol);
end.
__________________
var
kol,i:integer;
s:string;
begin
readln(s);
kol:=0;
For i:=1 to Length(s) do
if (s[i]='А') or (s[i]='Б') or (s[i]='В') then
kol:=kol+1;
writeln(kol);
end.
__________________