#include<stdio.h>
#include<stdlib.h>

long long na(long a, long b, long c)
{
    char q[60];
	
	sprintf(q, "%li%li%li", a,b,c);
	return strtoll(q, NULL, 10);
}

main()
{
	long a,b,c;
	long long x[6], max=0;
	scanf("%li %li %li", &a, &b, &c);
	
	x[0]=na(a, b, c);
	x[1]=na(a, c, b);
	x[2]=na(b, a, c);
	x[3]=na(b, c, a);
	x[4]=na(c, a, b);
	x[5]=na(c, b, a);
	
	for (int i=0 ; i<6 ; ++i) 
    {
		if(max<x[i]) max=x[i];
	}
	
	printf("%lli", max);
}