import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto S = readln.chomp;
    auto N = S.length.to!int;
    string A = "";
    string B = "";

    foreach (i; 0..N) {
        if (S[i] == '1') A ~= S[i];
        else B ~= S[i];
    }

    if (B.empty) {
        A.writeln;
        return;
    }

    int x = B.length.to!int;
    foreach (i; 0..B.length.to!int) {
        if (B[i] == '2') {
            x = i;
            break;
        }
    }

    writeln(B[0..x] ~ A ~ B[x..$]);
}
