#include <iostream>
#include <cmath>


void razmeni(unsigned long long& a, unsigned long long& b)
{
	a = a + b;
	b = a - b;
	a = a - b;
}

int duzina(unsigned long long n)
{
	int duz = 0;

	while (n > 0)
	{
		n /= 10;
		duz++;
	}

	return duz;
}


bool toSwitch(unsigned long long a, unsigned long long b)
{
	//std::cout << a << ", " << b << std::endl;
	if (a == b) return false;
	int i = 1;
	while (a > 0 && b > 0)
	{
		int acif = a / pow(10, duzina(a) - i);
		int bcif = b / pow(10, duzina(b) - i);
		acif %= 10; bcif %= 10;

		//std::cout << acif << ", " << bcif << std::endl;

		if (acif > bcif) return false;
		else if (bcif > acif) return true;
		i++;

	}
	if (a > b) return false;
	else return true;
}



int main()
{
	unsigned long long x, y, z;
	int dy, dz;

	std::cin >> x >> y >> z;

	//sortiraj

	if (toSwitch(x, y)) razmeni(x, y);
	if (toSwitch(y, z)) razmeni(y, z);
	if (toSwitch(x, y)) razmeni(x, y);

	dy = duzina(y);
	dz = duzina(z);

	unsigned long long res = (x * pow(10, dy) + y) * pow(10, dz) + z;
	std::cout << res << std::endl; 



}