{$apptype console} uses math; var rez,n,m:int64; a,b,c:array[0..1000000] of byte; os,max,i,j:integer; s,ic:char; begin assign(input,'LAMAN.dat'); reset(input); repeat read(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; until s=' '; while not(eof(input)) do begin read(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(input); if a[0]>b[0] then max:=1; if b[0]>a[0] then max:=2; if a[0]=b[0] then begin i:=a[0]; while a[i]=b[i] do i:=i-1; if a[i]>b[i] then max:=1; if b[i]>a[i] then max:=2; end; //mult if max=1 then begin os:=0; c[0]:=a[0]; for i:=1 to c[0] do begin c[i]:=(a[i]*2+os) mod 10; os:=(a[i]*2+os) div 10; end; if os>0 then begin c[0]:=c[0]+1;c[c[0]]:=os;end; end; // if max=2 then begin os:=0; c[0]:=b[0]; for i:=1 to c[0] do begin c[i]:=(b[i]*2+os) mod 10; os:=(b[i]*2+os) div 10; end; if os>0 then begin c[0]:=c[0]+1;c[c[0]]:=os;end; end; if (a[1] mod 2=0)and(b[1] mod 2=1)or(a[1] mod 2=1)and(b[1] mod 2=0) then begin if c[c[0]]>0 then c[c[0]]:=c[c[0]]-1; if c[c[0]]=0 then begin c[c[0]-1]:=c[c[0]-1]-1;c[c[0]]:=9;end; end; assign(output,'LAMAN.sol'); rewrite(output); for i:=c[0] downto 1 do write(c[i]); writeln; close(output); end.