program zander;
var a,b,c,a1,b1,c1,pa,pb,pc,ea,eb,ec,br1,br2,br3,br4,br5,br6,t1,t2,t3:longint;


begin
read(a,b,c);
a1:=a;
b1:=b;
c1:=c;
pa:=0;
pb:=0;
pc:=0;
//broj cifara a
repeat
a1:=a1 div 10;
pa:=pa+1;
until a1=0;
//broj cifara b
repeat
b1:=b1 div 10;
pb:=pb+1;
until b1=0;
//broj cifara c
repeat
c1:=c1 div 10;
pc:=pc+1;
until c1=0;
//pravljenje desetog stepena
ea:=1;
eb:=1;
ec:=1;
for t1:=1 to pa do
ea:=ea*10;
for t2:=1 to pb do
eb:=eb*10;
for t3:=1 to pc do
ec:=ec*10;
//pravljenje brojeva
br1:=a*eb*ec+b*ec+c;
br2:=a*eb*ec+c*eb+b;
br3:=b*ea*ec+a*ec+c;
br4:=b*ea*ec+c*ea+a;
br5:=c*ea*eb+a*eb+b;
br6:=c*ea*eb+b*ea+a;
if br1>br2 then
 if br1>br3 then
  if br1>br4 then
   if br1>br5 then
    if br1>br6 then write(br1)
    else write(br6)
   else if br5>br6 then write (br5)
        else write(br6)
  else if br4>br5 then
        if br4>br6 then write(br4)
        else write(br6)
       else if br5>br6 then write(br5)
            else write(br6)
 else if br3>br4 then
       if br3>br5 then
        if br3>br6 then write(br3)
        else write(br6)
       else if br5>br6 then write(br5)
            else write(br6)
      else if br4>br5 then
            if br4>br6 then write(br4)
            else write(br6)
           else if br5>br6 then write(br5)
                else write(br6)
else if br2>br3 then
  if br2>br4 then
   if br2>br5 then
    if br2>br6 then write(br2)
    else write(br6)
   else if br5>br6 then write (br5)
        else write(br6)
  else if br4>br5 then
        if br4>br6 then write(br4)
        else write(br6)
       else if br5>br6 then write(br5)
            else write(br6)
 else if br3>br4 then
       if br3>br5 then
        if br3>br6 then write(br3)
        else write(br6)
       else if br5>br6 then write(br5)
            else write(br6)
      else if br4>br5 then
            if br4>br6 then write(br4)
            else write(br6)
           else if br5>br6 then write(br5)
                else write(br6);

end.