program Nadovezivanje;
var
  a,b,c,num1,num2,num3,num4,num5,num6,Code,max:longlongint;
  x,y,z,br1,br2,br3,br4,br5,br6:string;
begin
  read(a); read(b); read(c);

  str(a,x);
  str(b,y);
  str(c,z);

  br1:=x+y+z;
  br2:=x+z+y;
  br3:=y+x+z;
  br4:=y+z+x;
  br5:=z+x+y;
  br6:=z+y+x;

  val(br1, num1, Code);
  val(br2, num2, Code);
  val(br3, num3, Code);
  val(br4, num4, Code);
  val(br5, num5, Code);
  val(br6, num6, Code);

  max:=num1;
  if num2>max then max:=num2;
  if num3>max then max:=num3;
  if num4>max then max:=num4;
  if num5>max then max:=num5;
  if num6>max then max:=num6;

  writeln(max);





  readln;
  readln;

end.