#include <stdio.h>
#include <math.h>
#include <algorithm>
using namespace std;
int main()
{
    //ucitaj
    long long int a,b,c;
    scanf("%lld%lld%lld",&a, &b, &c);
    
    //br broj cifara
    int bra=0;
    int brb=0;
    int brc=0;
    int p=a;
    while(p>0)
    {   p/=10;
        bra++; }
        int ya=pow(10,bra);
        p=b;
    while(p>0)
    {   p/=10;
        brb++; }
        int yb=pow(10,brb);
        p=c;
    while(p>0)
    {   p/=10;
        brc++; }
        int yc=pow(10,brc);
    // sad jedan mali brute force
    long long int x1=c+b*yc+a*yc*yb;
    long long int x2=b+c*yb+a*yc*yb;
    long long int x3=c+a*yc+b*ya*yc;
    long long int x4=a+c*ya+b*ya*yc;
    long long int x5=b+yb*a+c*yb*ya;
    long long int x6=a+ya*b+c*ya*yb;
    printf("%lld",max(max(max(x3,x4),max(x1,x2)),max(x5,x6)));
    return 0;
}