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

int main()
{
    long long a,b,c,n1,n2,n3,n4,n5,n6,a1,b1,c1,ka=1,kb=1,kc=1,max;
    scanf("%lld",&a);
    scanf("%lld",&b);
    scanf("%lld",&c);
    a1=a;
    b1=b;
    c1=c;
    while(a1!=0){
        ka*=10;
        a1/=10;
    }
    while(b1!=0){
        kb*=10;
        b1/=10;
    }
    while(c1!=0){
        kc*=10;
        c1/=10;
    }
    n1=(a*kb+b)*kc+c;
    n2=(a*kc+c)*kb+b;
    n3=(b*ka+a)*kc+c;
    n4=(b*kc+c)*ka+a;
    n5=(c*ka+a)*kb+b;
    n6=(c*kb+b)*ka+a;
    max=n1;
    if(n2>max){max=n2;}
    if(n3>max){max=n3;}
    if(n4>max){max=n4;}
    if(n5>max){max=n5;}
    if(n6>max){max=n6;}
    printf("%lld",max);
    return 0;
}