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

int main()
{
	
			string a;
			string b;
			string c;

			cin >> a;
			cin >> b;
			cin >> c;
			long long max;
			//max = Convert.ToInt64(a + b + c);
			max = stoll(a + b + c, NULL);
			if (max < stoll(a + c + b))
			{
				max = stoll(a + c + b);
			}
			if (max < stoll(b + a + c))
			{
				max = stoll(b + a + c);
			}
			if (max < stoll(b + c + a))
			{
				max = stoll(b + c + a);
			}
			if (max < stoll(c + a + b))
			{
				max = stoll(c + a + b);
			}
			if (max < stoll(c + b + a))
			{
				max = stoll(c + b + a);
			}
			cout<<max<<endl;
		
    return 0;
}