#include <bits/stdc++.h>

using namespace std;

int main()
{
  string s1, s2, s3;
  cin >> s1 >> s2 >> s3;
  string s123 = s1 + s2 + s3;
  string s132 = s1 + s3 + s2;
  string s213 = s2 + s1 + s3;
  string s231 = s2 + s3 + s1;
  string s321 = s3 + s2 + s1;
  string s312 = s3 + s1 + s2;
  int i123 = atoi(s123.c_str());
  int i132 = atoi(s132.c_str());
  int i213 = atoi(s213.c_str());
  int i231 = atoi(s231.c_str());
  int i321 = atoi(s321.c_str());
  int i312 = atoi(s312.c_str());
  
  cout << max(  i123, max ( i132 ,  max ( i213,  max( i231, max (i321, i312) ) ) ) );
 
}