#include <iostream>
#include <string>

using namespace std;

int main()
{
    string a,b,c;
    cin>>a>>b>>c;
    string niz[6];
    int max=0;
    niz[0]=a+b+c;
    niz[1]=a+c+b;
    niz[2]=b+a+c;
    niz[3]=b+c+a;
    niz[4]=c+a+b;
    niz[5]=c+b+a;
    long long br;
    for(int i=0;i<6;i++)
    {
        br=stoi(niz[i]);
        if(br>max)
        {
            max=br;
        }
    }
    cout<<max;

    return 0;
}