uses crt;
var a,dv,ch,tr:integer;
begin
clrscr;
repeat
write('Nhap a='); readln(a);
until (100<=a) and (a<=999);
dv:=a mod 10;
ch:=a div 10; ch:=ch mod 10;
tr:=a div 100; tr:=tr mod 10;
writeln('Tong 3 chu so cua ',a,' la: ',dv+ch+tr);
readln;
end.