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

using namespace std;

string a[3];

int main()
{
	cin >> a[0] >> a[1] >> a[2];
	int max = stoi(a[0] + a[1] + a[2]);
	while (next_permutation(a, a + 3))
	{
		string perm = a[0] + a[1] + a[2];
		if (max < stoi(perm))
		{
			max = stoi(perm);
		}
	}
	cout << max << endl;
	return 0;
}