program prvo9;
var A,B,C,F,Y,S,i,z,d,i1,z1,d1,T,T2,T3,max:integer;
begin
read (A,B,C);
max:=0;
i
F:=A;
while F>0 do
begin
F:=Fdiv10;
i:=i+1;
end;
S:=B;
while S>0 do
begin
S:=Sdiv10;
z:=z+1;
end;
Y:=C;
while Y>0 do
begin
Y:=Ydiv10;
d:=d+1;
for T=1 to i do
begin
i1:=i1*10;
end;
for T2:=1 to z do
begin
z1:=z1*10;
end;
for T3:=1 to d do;
begin
d1:=d1*10;
Br1:=((A*z1+B)*d1+C);
Br2:=((A*d2+C)*z1+b;
Br3:=((B*i1+A)*d1+C);
Br4:=((B*d1+C)*i1+A);
Br5:=((C*i1+A)*z1+B);
Br6:=((C*z1+B)*i1+A);
max:=Br1;
if Br2>max then
max:=B2;
if Br3>max then
max:=Br3;
if Br4>max then
max:=Br4;
if Br5>max then
max:=Br5;
if Br6>max then
max:=Br6;
write (max);
end.