uses crt;
var a,b:longint;
d1,t1,i,x,y,d1,t2,j,dem,dem1,t:integer;
st1,st2:string;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
str(a,st1);
d1:=length(st1);
t1:=0;
for i:=1 to d1 do
begin
val(st1[i],x,y);
t1:=t1+x;
end;
str(b,st2);
d2:=length(st2);
t2:=0;
for j:=1 to d2 do
begin
val(st2[j],dem,dem1);
t2:=t2+dem;
end;
t:=t1+t2;
writeln('Tong cac chu so cua hai so nguyen ',a,' va ',b,' la: ',t);
readln;
end.