#include <iostream>
#include <string>
#include <sstream>


using namespace std;

string a;
string b;
string c;
string a1,a2,a3,a4,a5,a6;
long long mx1,mx2,mx3,mx4,mx5;
int main () {
cin>>a>>b>>c;

a1=a+b+c;

 stringstream geek(a1);
 long long x1 = 0;
    geek >> x1;

a2=a+c+b;

 stringstream geek2(a2);
 long long x2 = 0;
    geek2 >> x2;


a3=b+a+c;

 stringstream geek3(a3);
 long long x3 = 0;
    geek3 >> x3;


a4=b+c+a;

 stringstream geek4(a4);
 long long x4 = 0;
    geek4 >> x4;


a5=c+b+a;

 stringstream geek5(a5);
 long long x5 = 0;
    geek5 >> x5;


a6=c+a+b;

 stringstream geek6(a6);
 long long x6 = 0;
    geek6 >> x6;



mx1=max(x1,x2);
mx2=max(x3,x4);
mx3=max(x5,x6);
mx4=max(mx1,mx2);
mx5=max(mx4,mx3);


cout<<mx5;

return 0;
}