package takmicenjeJedan;
import java.util.Scanner;
public class Concatinate {
	
	
	static String ca;
	static String cb;
	static String cc;
	
	static long max;
	public static void main(String[] args) {
		long [] array = new long[6];
		
		Scanner sa = new Scanner(System.in);

		Scanner sb = new Scanner(System.in);

		Scanner sc = new Scanner(System.in);
		
		ca = sa.nextLine();
		cb = sb.nextLine();
		cc = sb.nextLine();
		
		array[0] = Long.valueOf(ca + cb + cc);
		
		array[1] = Long.valueOf(ca + cc + cb);
		
		array[2] = Long.valueOf(cb + ca + cc);
		
		array[3] = Long.valueOf(cb + cc + ca);
		
		array[4] = Long.valueOf(cc + ca + cb);
		
		array[5] = Long.valueOf(cc + cb + ca);
		
		max = array[0];
		for(int i = 0; i < 6; i++) {
			if(array[i] > max) {
				max = array[i];
			}
		}
		
		System.out.println(max);
	}
}