var f1,f2:text; a,b,c:array [0..100] of integer; i,os:integer; s:char; begin assign(f1,'long1.dat'); reset(f1); while not(eoln(f1)) do begin read(f1,s); if s in ['0'..'9'] then begin for i:=a[0] downto 1 do a[i+1]:=a[i]; a[1]:=ord(s)-ord('0'); a[0]:=a[0]+1; end; end; readln(f1,s); while not(eoln(f1)) do begin read(f1,s); if s in ['0'..'9'] then begin for i:=b[0] downto 1 do b[i+1]:=b[i]; b[1]:=ord(s)-ord('0'); b[0]:=b[0]+1; end; end; close(f1); if a[0]>b[0] then c[0]:=a[0] else c[0]:=b[0]; os:=0; for i:=1 to c[0] do begin c[i]:=(a[i]+b[i]+os) mod 10; os:=(a[i]+b[i]+os) div 10; end; if os>0 then begin c[0]:=c[0]+1;c[c[0]]:=os;end; assign(f2,'long1.sol'); rewrite(f2); for i:=c[0] downto 1 do write(f2,c[i]); writeln(f2); close(f2); end.