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

int main()
{
	long long int a, b, c;

	cin >> a >> b >> c;
	
	ostringstream oss;

	oss << a << b << c;

	string abc = oss.str();

	ostringstream oss1;

	oss1 << a << c << b;

	string acb = oss1.str();

	ostringstream oss2;

	oss2 << b << a << c;

	string bac = oss2.str();

	ostringstream oss3;

	oss3 << b << c << a;

	string bca = oss3.str();

	ostringstream oss4;

	oss4 << c << a << b;

	string cab = oss4.str();

	ostringstream oss5;

	oss5 << c << b << a;

	string cba = oss5.str();

	long long int abc_int = stoi(abc);
	long long int acb_int = stoi(acb);
	long long int bac_int = stoi(bac);
	long long int bca_int = stoi(bca);
	long long int cab_int = stoi(cab);
	long long int cba_int = stoi(cba);

	long long int sms = 0;

	if (abc_int >= acb_int 
	 && abc_int >= bac_int 
	 && abc_int >= bca_int 
	 && abc_int >= cab_int 
	 && abc_int >= cba_int)

		sms = abc_int;

	if (acb_int >= abc_int 
	 && acb_int >= bac_int 
	 && acb_int >= bca_int 
	 && acb_int >= cab_int 
	 && acb_int >= cba_int)

		sms = acb_int;

	if (bac_int >= abc_int 
	 && bac_int >= acb_int 
	 && bac_int >= bca_int 
	 && bac_int >= cab_int 
	 && bac_int >= cba_int)

		sms = bac_int;

	if (bca_int >= abc_int
	 && bca_int >= acb_int
	 && bca_int >= bac_int
	 && bca_int >= cab_int
	 && bca_int >= cba_int)

		sms = bca_int;

	if (cab_int >= abc_int
		&& cab_int >= acb_int
		&& cab_int >= bac_int
		&& cab_int >= bca_int
		&& cab_int >= cba_int)

		sms = cab_int;

	if (cba_int >= abc_int
		&& cba_int >= acb_int
		&& cba_int >= bac_int
		&& cba_int >= bca_int
		&& cba_int >= cab_int)

		sms = cba_int;

	cout << sms;
}