#include <bits/stdc++.h>
#include <typeinfo>
using namespace std;
int pow1(int a,int b);
int main()
{
    int a,b,c,br1=0,br2=0,br3=0;

    cin>>a>>b>>c;
    int a1=a,b1=b,c1=c;
    //odredjivanje cifara
    while( (a1>0) || (b1>0) || (c1>0))
    {
        if (a1>0)
        {
            br1++;
            a1/=10;
        }
        if (b1>0)
        {
            br2++;
            b1/=10;
        }
        if (c1>0)
        {
            br3++;
            c1/=10;
        }
    }

    br1=pow1(10,br1);//a
    br2=pow1(10,br2);//b
    br3=pow1(10,br3);//c
    //cout<<br1<<" "<<br2<<" "<<br3;
    //cout<<endl;
    int arr[6];
    arr[0] = (a*br2 + b)*br3+c;
    arr[1] = (a*br3 + c)*br2+b;
    arr[2] = (b*br1 + a)*br3+c;
    arr[3] = (b*br3 + c)*br1+a;
    arr[4] = (c*br1 + a)*br2+b;
    arr[5] = (c*br2 + b)*br1+a;
    int lol=0;
    for(int i=0;i<6;i++)
    {
        lol=max(arr[i],lol);
    }
    cout<<lol;


    return 0;
}

int pow1(int a,int b)
{
    int p=1;
    for (int i=0;i<b;i++)
    {
        p=p*a;
    }
    return p;
}