#include<iostream>
#include<string>
#include<algorithm>

using namespace std;

int main()
{
	string a, b, c;
	cin >> a >> b >> c;
	int finals[6];
	finals[0] = stoi(a + b + c);
	finals[1] = stoi(a + c + b);
	finals[2] = stoi(b + a + c);
	finals[3] = stoi(b + c + a);
	finals[4] = stoi(c + a + b);
	finals[5] = stoi(c + b + a);
	
	cout << *std::max_element(finals,finals+6);
	
	return 0;
}