#include <iostream>
#include <string>

using namespace std;

int main()
{
    int D,Max;
    string A,B,C;
    
    cin >> A;
    cin >> B;
    cin >> C;

    Max = 0;

    D = stoi(A+B+C);
    if(D > Max) {
        Max = D;
    }

    D = stoi(A+C+B);
    if(D > Max) {
        Max = D;
    }

    D = stoi(B+A+C);
    if(D > Max) {
        Max = D;
    }

    D = stoi(B+C+A);
    if(D > Max) {
        Max = D;
    }

    D = stoi(C+A+B);
    if(D > Max) {
        Max = D;
    }

    D = stoi(C+B+A);
    if(D > Max) {
        Max = D;
    }

    cout << Max << endl;
    
    return 0;
}