#include <stdio.h>
#include <stdlib.h>

void main()
{
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    long long a1=a, b1=b, c1=c, ab=1, bb=1, cb=1, broj, p1, p2, p3, p4, p5, p6;
    while(a1!=0){
        ab *= 10;
        a1 /= 10;
    }
    while(b1!=0){
        bb *= 10;
        b1 /= 10;
    }
    while(c1!=0){
        cb *= 10;
        c1 /= 10;
    }
    long long int niz[6];
    niz[0] = a*bb*cb + b*cb + c;
    niz[1] = a*bb*cb + c*bb + b;
    niz[2] = b*ab*cb + c*ab + a;
    niz[3] = b*ab*cb + a*cb + c;
    niz[4] = c*ab*bb + a*bb + b;
    niz[5] = c*ab*bb + b*ab + a;

    int i;
    long long max = niz[0];
    for(i=1; i<6; i++){
            if(niz[i]>max){
                max = niz[i];
            }
    }
    printf("%d", max);
}