#include <cstdio>
#include <vector>

std::vector<long long> cifre;
long long a , b , c;
char max[60] , abc[60] , acb[60] , bac[60] , bca[60] , cab[60] , cba[60];

void Spoji(char* S , long long a , long long b , long long c)
{
	long long t = 0;
	cifre.clear();
	while (a > 0)
	{
		cifre.push_back(a % 10);
		a /= 10;
	}
	for (long long i = cifre.size() - 1;i >= 0;--i) S[t++] = cifre[i] + '0';
	cifre.clear();
	while (b > 0)
	{
		cifre.push_back(b % 10);
		b /= 10;
	}
	for (long long i = cifre.size() - 1;i >= 0;--i) S[t++] = cifre[i] + '0';
	cifre.clear();
	while (c > 0)
	{
		cifre.push_back(c % 10);
		c /= 10;
	}
	for (long long i = cifre.size() - 1;i >= 0;--i) S[t++] = cifre[i] + '0';
}

void Max(char* max , char* S)
{
	for (long long i = 0;S[i];++i)
	{
		if (max[i] > S[i]) break;
		if (S[i] > max[i])
		{
			for (long long j = 0;S[j];++j) max[j] = S[j];
			break;
		}
	}
}

int main()
{
	scanf("%lld%lld%lld" , &a , &b , &c);
	Spoji(abc, a , b , c);
	Spoji(acb, a , c , b);
	Spoji(bac, b , a , c);
	Spoji(bca, b , c , a);
	Spoji(cab, c , a , b);
	Spoji(cba, c , b , a);
	for (long long i = 0;abc[i];++i) max[i] = abc[i];
	Max(max , acb);
	Max(max , bac);
	Max(max , bca);
	Max(max , cab);
	Max(max , cba);
	printf("%s" , max);
	return 0;
}