uses crt;
var a,b,s:string; i:longint;
function cong(a,b:string):string;
var s1,s2,i,nho,s:byte; c,d,k,t:string;
begin
cong:=''; c:=''; d:=''; k:='';
for i:=length(a) downto 1 do c:=c+a[i];
for i:=length(b) downto 1 do d:=d+b[i];
if length(c)<length(d) then begin t:=c; c:=d; d:=t; end;
nho:=0;
for i:=1 to length(c) do
begin
val(c[i],s1); val(d[i],s2);
s:=s1+s2+nho;
if s>9 then begin s:=s mod 10; nho:=1 end else nho:=0;
str(s,t);
k:=k+t;
end;
if nho=1 then k:=k+'1';
for i:=length(k) downto 1 do cong:=cong+k[i];
end;
begin
clrscr;
write('Nhap a: ');readln(a);
write('Nhap b: ');readln(b);
writeln(cong(a,b));
readln
end.