#include <iostream>
using namespace std;
int duzina(int n)
{
    int i=1;
    while(n>0)
    {
        i*=10;
        n/=10;
    }
    return i;
}
int main()
{
    long long int x, y, z;
    cin >> x >> y >> z;
    int a=duzina(x), b=duzina(y), c=duzina(z);
    long long int s1=x*b*c+y*c+z, s2=x*b*c+z*b+y;
    long long int s3=y*a*c+x*c+z, s4=y*a*c+z*a+x;
    long long int s5=z*a*b+x*b+y, s6=z*a*b+y*a+x;
    long long max=s1;
    if(s2>max)
        max=s2;
    if(s3>max)
        max=s3;
    if(s4>max)
        max=s4;
    if(s5>max)
        max=s5;
    if(s6>max)
        max=s6;
    cout << max;

    return 0;
}