Program HOC24;
const fi='Hoten.inp';
fo='tu.out';
var ht: string;
f: text;
d,i: integer;
procedure ip;
begin
assign(f,fi);
reset(f);
read(f,ht);
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
d:=0;
while ht[1]=#32 do delete(ht,1,1);
while ht[length(ht)]=#32 do delete(ht,length(ht),1);
while pos(#32#32,ht)<>0 do delete(ht,pos(#32#32,ht),1);
for i:=1 to length(ht) do if ht[i]=' ' then d:=d+1;
write(f,d+1);
close(f);
end;
begin
ip;
out;
end.