program takmicenjeA;
type
niz=array [1..3] of int64;
var
x:niz;
max1,max2,max3,p3,p2,p1,sum:int64;
begin
max1:=0;
max2:=0;
max3:=0;
p1:=10;
p2:=10;
p3:=10;
readln(x[1],x[2],x[3]);
 if x[1]<p1 then max1:=x[1] else begin 
  repeat begin
   p1:=p1*10; if x[1]<=p1 then max1:=(x[1] div (p1 div 10)); end;
  until (x[1]<p1); end;
 if x[2]<p2 then max2:=x[2] else begin 
  repeat begin
   p2:=p2*10; if x[2]<=p2 then max2:=(x[2] div (p2 div 10)); end;
  until (x[2]<p2); end;
 if x[3]<p3 then max3:=x[3] else begin 
  repeat begin
   p3:=p3*10; if x[3]<=p3 then max3:=(x[3] div (p3 div 10)); end;
  until (x[3]<p3); end;
if (max1>=max2) and (max1>=max3) and (max2>=max3) then sum:=x[1]*p2*p3+x[2]*p3+x[3];
if (max1>=max2) and (max1>=max3) and (max3>=max2) then sum:=x[1]*p2*p3+x[3]*p2+x[2];
if (max2>=max3) and (max2>=max1) and (max1>=max3) then sum:=x[2]*p1*p3+x[1]*p3+x[3];
if (max2>=max3) and (max2>=max1) and (max3>=max1) then sum:=x[2]*p1*p3+x[3]*p1+x[1];
if (max3>=max1) and (max3>=max2) and (max2>=max1) then sum:=x[3]*p2*p1+x[2]*p1+x[1];
if (max3>=max1) and (max3>=max2) and (max1>=max2) then sum:=x[3]*p2*p1+x[1]*p2+x[2];
writeln(sum);
end.