program slovo;
var
a:string;
i,j:integer;
t:boolean;
begin
writeln('BBEdi ctroky');
readln(a);
i:=1;
j:=0;
while i<=length(a) do
begin
t:=false;
while (a[i]<>' ') and (i<=length(a)) do
begin
t:=true;
i:=i+1;
end;
if t then j:=j+1;
i:=i+1;
end;
writeln('B ctpoke clov=',j);
readln;
end.