#include<iostream>
#include<cstdio>
using namespace std;
unsigned long long aa,bb,cc,ta,tb,tc,ast,bst,cst,x,z;
int i,av,bv,cv,an,bn,cn,v[3],boab,boac,bobc;
int a[20], b[20], c[20];
int main(){
    scanf("%llu %llu %llu", &aa, &bb, &cc);
    ta=aa;tb=bb;tc=cc;ast=10;bst=10;cst=10;
    for(i=1;aa>9;i++){
        a[i]=aa%10; aa/=10; ast*=10;
    }
    a[i]=aa; av=i;
    for(i=1;bb>9;i++){
        b[i]=bb%10; bb/=10; bst*=10;
    }
    b[i]=bb; bv=i;
    for(i=1;cc>9;i++){
        c[i]=cc%10; cc/=10; cst*=10;
    }
    c[i]=cc; cv=i;
    if(av+bv+cv<20){
        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);
    } else{
        int u[av+bv+cv];
        if(av>bv){
            if(av>cv){
                if(bv>cv){
                    v[0]=av; v[1]=bv; v[2]=cv;
                }
                else{
                    v[0]=av; v[1]=cv; v[2]=bv;
                }
            }
            else{
                v[0]=cv; v[1]=av; v[2]=bv;
            }
        }
        else{
            if(av>cv){
                v[0]=bv; v[1]=av; v[2]=cv;
            }
            else{
                if(bv>cv){
                    v[0]=bv; v[1]=cv; v[2]=av;
                }
                else{
                    v[0]=cv; v[1]=bv; v[2]=av;
                }
            }
        }
        boab=0; boac=0;bobc=0;
        for(i=0;i<v[2] && (boab==0 || boac==0 || bobc==0);i++){
            an=a[av-i]; bn=b[bv-i]; cn=c[cv-i];
            if(boab==0){
                if(an!=bn){
                    if(an>bn){
                        boab=2;
                    }
                    else{
                        boab=1;
                    }
                }
            }
            if(bobc==0){
                if(bn!=cn){
                    if(bn>cn){
                        bobc=2;
                    }
                    else{
                        bobc=1;
                    }
                }
            }
            if(boac==0){
                if(an!=cn){
                    if(an>cn){
                        boac=2;
                    }
                    else{
                        boac=1;
                    }
                }
            }
        }
        //charlie
        if(boab==2){
            if(bobc==2){
                for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
            }
            else{
                if(boac==2){
                    for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
                for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                }
                else{
                    for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
                for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                }
            }
        }
        else{
            if(boac==2){
                for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
            }
            else{
                if(bobc==2){
                    for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
                for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                }
                else{
                    for(i=cv;i>0;i-=1){
                    printf("%d",c[i]);
                }
                for(i=bv;i>0;i-=1){
                    printf("%d",b[i]);
                }
                for(i=av;i>0;i-=1){
                    printf("%d",a[i]);
                }
                }
            }
        }
    }
    // for(i=1;i<=b[0];i++) cout<<b[i];
    return 0;
}