PROGRAM gaojingjia;
CONST
fin='add.in';
fout='add.out';
maxn=100+3;
TYPE
shu100=array[0..maxn]of shortint;
VAR
x,y:shu100;
lx,ly,t:shortint;
c:char;
PROCEDURE jia(a,b:shortint;var i,j:shu100);
var li,lj:shortint;
begin
li:=a;
lj:=b;
for lj:=lj downto 1 do
begin
inc(i[li],j[lj]);
if i[li]>9 then
begin
dec(i[li],10);
inc(i[li-1]);
End;
dec(li);
End;
if i[li]=10 then
begin
i[li]:=0;
dec(li);
while i[li]=9 do
begin
i[li]:=0;
dec(li);
End;
inc(i[li]);
End;
End;
PROCEDURE print(var s:shu100;l:shortint);
var i:shortint;
begin
if s[0]=1 then write(1);
for i:=1 to l do write(s[i]);
End;
BEGIN
assign(input,fin);reset(input);
assign(output,fout);rewrite(output);
lx:=0;
repeat
inc(lx);
read(c);
x[lx]:=ord(c)-48;
until eoln;
readln;
ly:=0;
repeat
inc(ly);
read(c);
y[ly]:=ord(c)-48;
until eoln;
if lx>ly then begin jia(lx,ly,x,y);print(x,lx);end
else begin jia(ly,lx,y,x);print(y,ly);end;
close(output);
END.