#include<bits/stdc++.h>
using namespace std;
int main()
{

    long long A, B, C, A1, B1, C1;
    cin>>A>>B>>C;
    A1=A;
    B1=B;
    C1=C;
    long long j=1, j1=1, k=1, k1=1, l=1, l1=1;
    while(A>9){
        A=A/10;
        j++;
    }
    while(j>0){
        j=j-1;
        j1=j1*10;
    }
    while(B>9){
        B=B/10;
        k++;
    }
    while(k>0){
        k=k-1;
        k1=k1*10;
    }
    while(C>9){
        C=C/10;
        l++;
    }
    while(l>0){
        l=l-1;
        l1=l1*10;
    }
    long long ABC, ACB, BAC, BCA, CAB, CBA, maxi, maxi1, maxi2, maxi3, maxii;
    ABC=C1+B1*l1+A1*k1*l1;
    ACB=B1+C1*k1+A1*k1*l1;
    BAC=C1+A1*l1+B1*l1*j1;
    BCA=A1+C1*j1+B1*l1*j1;
    CAB=B1+A1*k1+C1*k1*j1;
    CBA=A1+B1*j1+C1*j1*k1;
    maxi= max(ABC, ACB);
    maxi1=max(BAC, BCA);
    maxi2=max(CAB, CBA);
    maxi3=max(maxi, maxi1);
    maxii=max(maxi3, maxi2);
    cout<<maxii;
}