#include <iostream>

using namespace std;
unsigned long long int stepenovanje(int n)
{ unsigned long long int k=1;
    for(int i=0;i<n;i++)
    k=k*10;
    return k;
}
unsigned long long int max6(unsigned long long int a,unsigned long long int b,unsigned long long int c,unsigned long long int d,unsigned long long int m,unsigned long long int k)
{long long int ki;
if(a>b)ki=a;else ki=b;
if(ki<c)ki=c;
if(ki<d)ki=d;
if(ki<m)ki=m;
if(ki<k)ki=k;
return ki;

}
int main()
{unsigned long long int a,b,c;
 cin>>a>>b>>c;
 int a1=0,b1=0,c1=0;
 unsigned long long int a2=a,b2=b,c2=c;

    while(a2!=0)
 {
    a1++;
    a2=a2/10;
 }
 while(b2!=0)
 {
    b1++;
     b2=b2/10;
 }
 while(c2!=0)
 {
    c1++;
    c2=c2/10;
 }//cout<<stepenovanje(2);
 unsigned long long int m1,m2,m3,m4,m5,m6;
 m1=(a*stepenovanje(b1)+b)*stepenovanje(c1)+c;
 m2=(a*stepenovanje(c1)+c)*stepenovanje(b1)+b;
 m3=(b*stepenovanje(c1)+c)*stepenovanje(a1)+a;
 m4=(b*stepenovanje(a1)+a)*stepenovanje(c1)+c;
 m5=(c*stepenovanje(b1)+b)*stepenovanje(a1)+a;
 m6=(c*stepenovanje(a1)+a)*stepenovanje(b1)+b;
/*cout<<m1<<endl;
cout<<m2<<endl;
cout<<m3<<endl;
cout<<m4<<endl;
cout<<m5<<endl;
cout<<m6<<endl;*/
 cout<<max6(m1,m2,m3,m4,m5,m6);

 }