#include<iostream>
#include<cstdio>
using namespace std;
unsigned long long aa,bb,cc,x,z,ta,tb,tc;
unsigned long long ast,bst,cst;
int i;
int a[20], b[20], c[20];
int main(){
    ast=10;
    bst=10;
    cst=10;
    scanf("%lld %lld %lld", &aa, &bb, &cc); ta=aa; tb=bb; tc=cc;
    while(aa>9){
        aa/=10; ast*=10;
    }
    while(bb>9){
        bb/=10; bst*=10;
    }
    while(cc>9){
        cc/=10; cst*=10;
    }
    z=(ta*bst+tb)*cst+tc;
    x=(tb*ast+ta)*cst+tc; if(x>z){z=x;}
    x=(ta*cst+tc)*bst+tb; if(x>z){z=x;}
    x=(tb*cst+tc)*ast+ta; if(x>z){z=x;}
    x=(tc*ast+ta)*bst+tb; if(x>z){z=x;}
    x=(tc*bst+tb)*ast+ta; if(x>z){z=x;}
    printf("%lld", z);
    return 0;
}