program project1;
type tomb = array [1..6] of string;
  tomb1 = array [1..6] of int64;
  var a1,b1,c1:string;
      a,b,c,max:int64;
      vmi:tomb;
      sth:tomb1;
      s:string;
      i,j:byte;
begin
  readln(s);
  s:=s+' ';
  i := pos(' ',s);
  a1 := copy(s,1,i-1);
  delete(s,1,i);

  i := pos(' ',s);
  b1 := copy(s,1,i-1);
  delete(s,1,i);

  i := pos(' ',s);
  c1 := copy(s,1,i-1);
  delete(s,1,i);

  vmi[1]:=a1+b1+c1;
  vmi[2]:=a1+c1+b1;
  vmi[3]:=b1+a1+c1;
  vmi[4]:=b1+c1+a1;
  vmi[5]:=c1+a1+b1;
  vmi[6]:=c1+b1+a1;
   for i:=1 to 6 do
  val(vmi[i],sth[i],j);


  for i:=1 to 6 do
  if sth[i]>max then
     max:=sth[i];

str(max, s);
  writeln(s);

end.