#include "pch.h"
#include <iostream>
#include<algorithm>
using namespace std;


int main()
{
	long long int a, b, c, i = 10, j = 10, k = 10, x, y, z;
	cin >> a >> b >> c;
	x = a;
	y = b;
	z = c;
	while (a > 9)
	{
		a = a / 10;
		i = i * 10;
	}
	while (b > 9)
	{
		b = b / 10;
		j = j * 10;
	}
	while (c > 9)
	{
		c = c / 10;
	    k = k * 10;
	}

	cout << max(max(max(max(max(z + k * y + (k*j)*x, z + k * x + (i*k)*y), y + j * z + (j*k)*x), y + j * x + (j*i)*z), x + i * y + (i*j)*z), x + i * z + (i*k)*y);
}