#include<iostream>
#include<conio.h>
#include<string>
#include<vector>
using namespace std;

 unsigned long long  a, b, c, k, d, maxx = 0;

int main()
{

//123; 321; 312; 213; 231; 132
cin >> a;
cin >> b;
cin >> c;
int i, n, m;


	int s[10000];
	
	s[1] = a;
	s[2] = b;
	s[3] = c;
	
	
	
	
		d = 0;
		int times = 1;
		k = 0;
		i = 1, n = 2, m = 3;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//1 2 3
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
		d = 0;
	 times = 1;
	k = 0;
		i = 3, n = 2, m = 1;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//3 2 1
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
	
	
	
		d = 0;
	 times = 1;
	k = 0;
		i = 2, n = 1, m = 3;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//2 1 3
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
	
		d = 0;
	 times = 1;
	k = 0;
		i = 3, n = 1, m = 2;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//3 1 2
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
			
				d = 0;
	 times = 1;
	k = 0;
		i = 1, n = 3, m = 2;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//1 3 2
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
	
	
		d = 0;
	 times = 1;
	k = 0;
		i = 2, n = 3, m = 1;
   while (times <= s[i])
      times *= 10;
   d = s[i]*times + s[n];			//2 3 1
   
   times = 1;
   while (times <= d)
      times *= 10;
	k = s[m]*times + d;

	
			if(maxx < k)
			{
				maxx = k;	 
			}
	
cout << maxx;
   
}