#include <bits/stdc++.h>

using namespace std;
#include <string>
#include<sstream>

int main()
{
    string A,B,C;
    cin>>A>>B>>C;
    string niz [6];
    niz[0] = A + B + C;
    niz [1] = A+ C + B;
    niz [2] = B + C + A;
    niz [3] = B + A + C;
    niz [4] = C + A + B;
    niz [5] = C + B + A;
    int brojevi[6];
    brojevi [0] = std ::stoi(niz[0]);
    int maks = brojevi[0];
   for (int i=1;i<6;i++)
   {
      brojevi [i] = std::stoi(niz[i]);
       if (brojevi[i]>maks)
        maks = brojevi[i];
   }
   cout<<maks;
    return 0;
}