program Project1;

var a,b,c,ln:Int64;
    al,bl,cl,l:Int64;
    h:array[1..6]of Int64;

procedure hosza(i:Int64);
begin

if (a>=10*i)and(a<100*i) then begin al:=i*10; exit; end;
i:=i*10;
if (a>0) then hosza(i);

end;

procedure hoszb(i:Int64);
begin

if (b>=10*i)and(b<100*i) then begin bl:=i*10; exit; end;
l:=l+1;
i:=i*10;
if (b>0) then hoszb(i);

end;

procedure hoszc(i:Int64);
begin

if (c>=10*i)and(c<100*i) then begin cl:=i*10; exit; end;
l:=l+1;
i:=i*10;
if (c>0) then hoszc(i);

end;

procedure kapcs;
var i:integer;
begin

h[1]:=a*100*(bl*cl)+b*10*(cl)+c;
h[2]:=a*100*(cl*bl)+c*10*(bl)+b;
h[3]:=b*100*(al*cl)+a*10*(cl)+c;
h[4]:=b*100*(cl*al)+c*10*(al)+a;
h[5]:=c*100*(al*bl)+a*10*(bl)+b;
h[6]:=c*100*(bl*al)+b*10*(al)+a;

ln:=h[1];
for i:=1 to 6 do if (h[i]>ln) then ln:=h[i];

end;

begin

read(a,b,c);

if (a<10) then al:=1
else hosza(1);

l:=2;
if (b<10) then bl:=1
else hoszb(1);

l:=2;
if (c<10) then cl:=1
else hoszc(1);

kapcs;

writeln(ln);

end.