#include <iostream>

using namespace std;

int main()
{
    long long A, B, C, br1, br2, br3, br4, br5, br6, A1,B1,C1,prom1=1,prom2=1,prom3=1,najv;
    cin>>A>>B>>C;
    A1=A;
    B1=B;
    C1=C;
    while(A1>0)
    {   
        A1=A1/10;
        prom1=prom1*10;
    }
    while(B1>0)
    {
        B1=B1/10;
        prom2=prom2*10;
    }
    while(C1>0)
    {
        C1=C1/10;
        prom3=prom3*10;
    }
    br1=(((A*prom2)+B)*prom3)+C;
    br2=(((A*prom3)+C)*prom2)+B;
    br3=(((B*prom1)+A)*prom3)+C;
    br4=(((B*prom3)+C)*prom1)+A;
    br5=(((C*prom1)+A)*prom2)+B;
    br6=(((C*prom2)+B)*prom1)+A;
    najv=br1;
    if(najv<br2)
    {
        najv=br2;
    }
    if(najv<br3)
    {
        najv=br3;
    }
    if(najv<br4)
    {
        najv=br4;
    }
    if(najv<br5)
    {
        najv=br5;
    }
    if(najv<br6)
    {
        najv=br6;
    }
    cout<<najv<<endl;
}