#include <iostream>

using namespace std;

int main()
{
    long long int a, b, c, n, x=1, y=1, z=1;
    cin >> a >> b >> c;
    n=a;
    while(n>0)
    {
        x*=10;
        n/=10;
    }
    n=b;
    while(n>0)
    {
        y*=10;
        n/=10;
    }
    n=c;
    while(n>0)
    {
        z*=10;
        n/=10;
    }
    n=a*(y*z)+b*z+c;
    if(a*(y*z)+c*y+b>n)
        n=a*(y*z)+c*y+b;
    if(c*(y*x)+a*y+b>n)
        n=c*(y*x)+a*y+b;
    if(b*(x*z)+a*z+c)
        n=b*(x*z)+a*z+c;
    if(b*(x*z)+c*x+a>n)
        n=b*(x*z)+c*x+a;
    if(c*(y*x)+b*x+a>n)
        n=c*(y*x)+b*x+a;
    cout << n;
    return 0;
}