#include<iostream>
#include<cstdlib>
#include<string>

using namespace std;

int main()
{
    string A,B,C;

    cin >> A >> B >> C;

    int K,L,M,P,Q,R;

    K = stoi(A+B+C);
    L = stoi(A+C+B);
    M = stoi(B+A+C);
    P = stoi(B+C+A);
    Q = stoi(C+A+B);
    R = stoi(C+B+A);

    int X = K;

    if (X < L) X = L;
    if (X < M) X = M;
    if (X < P) X = P;
    if (X < Q) X = Q;
    if (X < R) X = R;

    cout << X;

    return 0;
}