#include <bits/stdc++.h>

using namespace std;

long long n[10];

int main()
{
	long long A, B, C, a, b, c, as = 1, bs = 1, cs = 1, m = 0;
	
	scanf("%lld%lld%lld", &A, &B, &C);
	a = A;
	b = B;
	c = C;
	
	while(a)
	{
		a /= 10;
		as *= 10;
	}
	while(b)
	{
		b /= 10;
		bs *= 10;
	}
	while(c)
	{
		c /= 10;
		cs *= 10;
	}
	
	n[0] = (A * bs + B) * cs + C;
	n[1] = (A * cs + C) * bs + B;
	n[2] = (B * as + A) * cs + C;
	n[3] = (B * cs + C) * as + A;
	n[4] = (C * as + A) * bs + B;
	n[5] = (C * bs + B) * as + A;
	
	for(int i = 0; i < 6; i++)
		if(n[i] > m) m = n[i];
	
	
	printf("%lld", m);
	
	return 0;
}