program a2;
var a, b, c, a1, b1, c1, ba, bb, bc, r1, r2, r3, r4, r5, r6, max : longint;

begin
    read(a,b,c);
    
    a1:= a div 10;
    b1:= b div 10;
    c1:= c div 10;
    
    ba:=10;
    bb:=10;
    bc:=10;
    
    while a1>0 do
    begin
        a1:=a1 div 10;
        ba:=ba*10;
    end;
    
    while b1>0 do
    begin
        b1:=b1 div 10;
        bb:=bb*10;
    end;
    
    while c1>0 do
    begin
        c1:=c1 div 10;
        bc:=bc*10;
    end;
    
    r1:=a*bb*bc+b*bc+c;
    r2:=a*bb*bc+c*bb+b;
    r3:=b*ba*bc+a*bc+c;
    r4:=b*ba*ba+c*ba+a;
    r5:=c*bb*ba+a*bb+b;
    r6:=c*bb*ba+b*ba+a;
    
    max:=r1;
    if r2>max then max:=r2;
    if r3>max then max:=r3;
    if r4>max then max:=r4;
    if r5>max then max:=r5;
    if r6>max then max:=r6;
    
    write(max);
end.