#include <stdio.h>


void main(){
 int a, b, c, i, as, bs, cs;
 long long max = 0, t = 0;
 scanf("%d%d%d", &a, &b, &c);
 as = sizen (a);
 bs = sizen (b);
 cs = sizen (c);
 t = a*bs*cs+b*cs+c;
 if(t > max){
     max = t;
 }
 t = a*bs*cs+c*bs+b;
 if(t > max){
     max = t;
 }
 t = b*as*cs+a*cs+c;
 if(t > max){
     max = t;
 }
 t = b*as*cs+c*as+a;
 if(t > max){
     max = t;
 }
 t = c*as*bs+a*bs+b;
 if(t > max){
     max = t;
 }
 t = c*as*bs+b*as+a;
 if(t > max){
     max = t;
 }
 printf("%lld", max);
}

int sizen (int n){
    int s = 1;
    while (n>=1){
        s*=10;
        n /= 10;
    }
    return s;
}