program rechennia;
var s: string;
i,k,l: integer;
begin
repeat
writeln ('vvedit rechennia');
readln (s);
l:=length (s);
until s[l]='.';
delete (s,l,1);
l:=l-1;
k:=0;
for i:=1 to l do
if s[i]=' ' then k:=k+1;
writeln ('sliv - ',k+1);
readln
end.