#include <bits/stdc++.h>

using namespace std;

#define INFI 987654321
#define INFL 987654321987654321
#define MOD 1000000007

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

template<typename T>
void read(T, long long);

template<typename T>
void write(T, long long);

template<typename T>
long long sumFor(T, long long, long long);

template<typename T>
long long sumFor(T, long long);

long long power(long long, long long, long long);
long long power(long long, long long);
void add(long long&, long long&);
long long getRand();
long long max(long long, long long, long long);

/// //MAIN// ///

//long long a[500005];
long long a[3];

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    cin >> a[0] >> a[1] >> a[2];
    string mn = "0";
    for(long long i = 0; i < 3; ++i){
        for(long long j = 0; j < 3; ++j){
            if(j == i){
                continue;
            }
            for(long long k = 0; k < 3; ++k){
                if(k == j || k == i){
                    continue;
                }
                stringstream ss1;
                stringstream ss2;
                string s;
                ss1 << a[i] << a[j] << a[k];
                s = ss1.str();

                if(!lexicographical_compare(s.begin(), s.end(), mn.begin(), mn.end())){
                    mn = s;
                }
            }
        }
    }

    cout << mn << "\n";
    return 0;
}

/// /////////////////////////////////////////////

long long max(long long m_a, long long m_b, long long m_c){
    if(m_c >= m_a && m_c >= m_b){
        return m_c;
    }
    return m_a >= m_b ? m_a : m_b;
}

long long getRand(){
    return rng();
}

void add(long long& m_a, long long& m_b){
    m_a = (m_a + m_b) % MOD;
}

template<typename T>
void write(T m_pnter, long long m_size){
    for(long long i = 0; i < m_size; ++i){
        cout << m_pnter[i] << " ";
    }
    cout << "\n";
}

template<typename T>
void read(T m_pnter, long long m_size){
    for(long long i = 0; i < m_size; ++i){
        cin >> m_pnter[i];
    }
}

template<typename T>
long long sumFor(T m_pnter, long long m_l, long long m_r){
    long long m_sum = 0;
    for(long long i = m_l; i < m_r; ++i){
        m_sum += m_pnter[i];
    }
    return m_sum;
}

template<typename T>
long long sumFor(T m_pnter, long long m_r){
    long long m_sum = 0;
    for(long long i = 0; i < m_r; ++i){
        m_sum += m_pnter[i];
    }
    return m_sum;
}

long long power(long long m_a, long long m_b, long long m_mod){
    long long m_res = 1;
    while(m_b > 0){
        if(m_b % 2 == 1){
            m_res = (m_res * m_a) % m_mod;
        }
        m_b /= 2;
        m_a = (m_a * m_a) % m_mod;
    }
    return m_res;
}

long long power(long long m_a, long long m_b){
    long long m_res = 1;
    while(m_b > 0){
        if(m_b % 2 == 1){
            m_res = m_res * m_a;
        }
        m_b /= 2;
        m_a = m_a * m_a;
    }
    return m_res;
}