#include <iostream>
#include <sstream>

#define ull unsigned long long

using namespace std;

void next(string &s, int a, int b, int c) {

    stringstream ss;
    ss << a << b << c;
    s = ss.str();
}

int main() {

    ull a, b, c;

    cin >> a >> b >> c;

    string s, s1;

    if(a == 0 && b == 0 && c == 0) {
        cout << 0;
        return 0;
    }

    next(s, a, b, c);
    next(s1, a, c, b);

    if(s1 > s)
        s = s1;

    next(s1, b, a, c);

    if(s1 > s)
        s = s1;

    next(s1, b, c, a);

    if(s1 > s)
        s = s1;

    next(s1, c, a, b);

    if(s1 > s)
        s = s1;

    next(s1, c, b, a);

    if(s1 > s)
        s = s1;

    cout << s << endl;
    return 0;
}