Program HOC24;
var s: string;
i,d: byte;
begin
write('Nhap xau :'); readln(s);
d:=0;
for i:=1 to length(s) do if s[i]=' ' then d:=d+1;
write('Xau ',s,' co ',d,' ki tu cach');
readln
end.
uses crt;
var s:string;
i,d,dem:integer;
begin
clrscr;
write('Nhap xau:); readln(s);
d:=length(s);
dem:=0;
for i:=1 to d do
if s[i]=#32 then inc(dem);
writeln(dem);
readln;
end.