program radi;
var
x,y,z,m,l1,l2,l3:longint;
i1,i2,i3:integer;
pom:real;
a:array[1..2] of real;
b:array[1..2] of real;
c:array[1..2] of real;
function deset(x:integer):longint;
         var p,i:integer;
         begin
         p:=1;
         for i:=1 to x do p:=p*10;
         deset:=p;
         end;
begin
read(x,y,z);
m:=x;
while m>0 do
      begin
      i1:=i1+1;
      m:=m div 10;

      end;
m:=y;
while m>0 do
      begin
      i2:=i2+1;
      m:=m div 10;

      end;
m:=z;
while m>0 do
      begin
      i3:=i3+1;
      m:=m div 10;

      end;
l1:=deset(i1);
l2:=deset(i2);
l3:=deset(i3) ;
a[1]:=x*l2*l3+y*l3+z;
a[2]:=x*l2*l3+z*l2+y;
if a[1]<a[2] then
   begin
   pom:=a[1];
   a[1]:=a[2];
   a[2]:=pom;
   end;
b[1]:=y*l1*l3+x*l3+z;
b[2]:=y*l1*l3+z*l1+x;
if b[1]<b[2] then
   begin
   pom:=b[1];
   b[1]:=b[2];
   b[2]:=pom;
   end;
c[1]:=z*l2*l1+x*l2+y;
c[2]:=z*l2*l1+y*l1+x;
if c[1]<c[2] then
   begin
   pom:=c[1];
   c[1]:=c[2];
   c[2]:=pom;
   end;
if a[1]<b[1] then
   begin
   pom:=a[1];
   a[1]:=b[1];
   b[1]:=pom;
   end;
if b[1]<c[1] then
   begin
   pom:=b[1];
   b[1]:=c[1];
   c[1]:=pom;
   end;
if a[1]<b[1] then
   begin
   pom:=a[1];
   a[1]:=b[1];
   b[1]:=pom;
   end;
write(a[1]:0:0);
end.