var sum,n:int64;begin write('Vvedite chislo: '); readln(n); while(n>0) do begin sum:=sum+(n mod 10); n:=n div 10; end; writeln(sum); readln;end.
var sum,n:int64;
begin
write('Vvedite chislo: ');
readln(n);
while(n>0) do begin
sum:=sum+(n mod 10);
n:=n div 10;
end;
writeln(sum);
readln;
end.