#include<iostream>
#include<string.h>
#include<algorithm>

using namespace std;

int main(){
    char br[3][20];
    char tmp[20];
    int pr_arr[3] = {1, 2, 3};
    __int64 m = 0;
    __int64 t = 0;

    for(int i=0;i<3;i++){
        cin >> br[i];
    }
    do{
        strcpy(tmp, "\0");
        for(int i=0;i<3;i++){
            strcat(tmp, br[pr_arr[i]-1]);
        }
        t = atoi(tmp);
        if(t > m){
            m = t;
        }
    }while(next_permutation(pr_arr, pr_arr+3));

    cout << m <<endl;
    return 0;
}