#include <iostream>
#include<bits/stdc++.h>
#define For(a,b,c) for(int a=b;a<=c;a++)
#define Ford(a,b,c) for(int a=b;a>=c;a--)
#define ll long long
#define pb push_back
const int MAX=2*1e5+2;
using namespace std;

int t,tmp;
ll a[3];
vector<int> v[2];

void rastavi(ll a,int x)
{
    v[x].clear();
    while (a>0)
    {
        v[x].pb((int)(a%10));
        a=(ll)(a/(ll)10);
    }
    t=v[x].size();
    For(i,0,(t-1)/2)
    {
        tmp=v[x][i];
        v[x][i]=v[x][t-1-i];
        v[x][t-1-i]=tmp;
    }
}

ll makenum(int x,int s)
{
   ll m=0;
   For(i,s,v[x].size()-1)
   {
       m=(ll)10*m+(ll)v[x][i];
   }
   return m;
}

bool cmp(ll a,ll b)
{
    if (a==b) return true;
    rastavi(a,0);
    rastavi(b,1);
    int l=min(v[0].size(),v[1].size());
    For(i,0,l-1)
    {
        if (v[0][i]>v[1][i]) return false;
        if (v[0][i]<v[1][i]) return true;
    }
    if (l==v[0].size())
        return cmp(a,makenum(1,l));
    if (l==v[1].size())
        return cmp(makenum(0,l),b);

}

int main()
{
    For(i,0,2)
    cin>>a[i];
    sort(a,a+3,cmp);
    printf("%I64d%I64d%I64d",a[2],a[1],a[0]);
    return 0;
}