#include <bits/stdc++.h>
using namespace std;
#define si short int
#define ll long long

ll to_num(string a);

int main(void)
{

    string a,b,c;
    cin>>a>>b>>c;// posle u scanf
    string a1,a2,a3,a4,a5,a6;
    a1=a+b+c;
    a2=a+c+b;
    a3=b+a+c;
    a4=b+c+a;
    a5=c+a+b;
    a6=c+b+a;
    ll b1,b2,b3,b4,b5,b6;
    b1=to_num(a1);
    b2=to_num(a2);
    b3=to_num(a3);
    b4=to_num(a4);
    b5=to_num(a5);
    b6=to_num(a6);
    printf("%lld", max(max(max(max(b1,max(b5,b6)),b2),b3),b4));
}

ll to_num(string a)
{
    ll num=0;
    for(ll i=0;i<a.size();i++)
        num=num*10+a[i]-48;
    return num;
}


/*
int main(void)
{
    string a,b,c;
    cin>>a>>b>>c
}
*/