#include<iostream>
#include<sstream>
using namespace std;
int main()
{
    long m1,m2,m3,m4,m5,m6,i1,i2,i3,i4,i5,i6;
    int n;
    string A,B,C;
    cin>>A>>B>>C;
    string br1,br2,br3,br4,br5,br6;
    br1=A+B+C;
    br2=A+C+B;
    br3=B+A+C;
    br4=B+C+A;
    br5=C+A+B;
    br6=C+B+A;
    stringstream m1(br1);
    m1>>i1;
    stringstream m2(br2);
    m2>>i2;
    stringstream m3(br3);
    m3>>i3;
    stringstream m4(br4);
    m4>>i4;
    stringstream m5(br5);
    m5>>i5;
    stringstream m6(br6);
    m6>>i6;
    long max=i1;
    if (i2>max)
    {
        max=i2;
    }   
    if (i3>max)
    {
        max=i3;
    }
    if (i4>max)
    {
        max=i4;
    }
    if (i5>max)
    {
        max=i5;
    }
    if (i6>max)
    {
        max=i6;
    }
    cout<<max<<endl;
}