var a,b,c,d1,d2,d3,d4,d5,d6,max:string;s:string[1];
begin
a:='';b:='';c:='';
read(s);
while((s<='9') and (s>='0')) do
begin
  a:=a+s;
  read(s);
end;
read(s);
while((s<='9') and (s>='0')) do
begin
  b:=b+s;
  read(s);
end;
read(s);
while((s<='9') and (s>='0')) do
begin
  c:=c+s;
  read(s);
end;
d1:=a+b+c;
d2:=a+c+b;
d3:=b+a+c;
d4:=b+c+a;
d5:=c+a+b;
d6:=c+b+a;
max:=d1;
if (d2>max) then max:=d2;
if (d3>max) then max:=d3;
if (d4>max) then max:=d4;
if (d5>max) then max:=d5;
if (d6>max) then max:=d6;
writeln(max);
end.