program TongChuSo;
var
n, sum: integer;
begin
write('Nhap n: ');
readln(n);
sum := 0;
while n > 0 do
begin
sum := sum + (n mod 10);
n := n div 10;
end;
writeln('Tong cac chu so cua n la: ', sum);
readln;
end.