const fi='demxau.inp',
fo='demxau.out'
var f1,f2:text;
st:string;
d,i,dem:integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,st);
d:=length(st);
dem:=0;
for i:=1 to d do
if st[i]=' ' then dem:=dem+1;
writeln(f2,dem+1);
close(f1);
close(f2);
end.