#include<iostream>
#include<string>
#include<sstream>
using namespace std;
main(){
	string kombo[6],A,B,C;
	unsigned long long i,max,komba[6];
	cin>>A>>B>>C;
	kombo[0]=A+B+C;
	kombo[1]=A+C+B;
	kombo[2]=B+A+C;
	kombo[3]=B+C+A;
	kombo[4]=C+A+B;
	kombo[5]=C+B+A;
	for(i=0;i<6;i++){
		komba[i]=stoull(kombo[i]);
	}
	max=komba[0];
	for(i=1;i<6;i++){
		if(komba[i]>max){
			max=komba[i];
		}
	}
	cout<<max;
}