Program qqq;
var n, s, x1, z1, i, del: integer;
begin
writeln ('vvedi 5-znachnoe chislo < 32768');
{ограничение типа integer}
readln (n);
del:=10000;
for i:=1 to 5 do
begin
z1:= n mod del;
x1:= n div del;
s:=s+x1;
n:=z1;
del:=del div 10;
end;
writeln ('summa cifr=', s);
readln;
end.