#include <bits/stdc++.h>
using namespace std;
const long long N = 100005;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  {
    long long i, j, k, n, m, ans = 0, cnt = 0, sum = 0;
    string s;
    cin >> s;
    n = s.size();
    string ss = "";
    for (i = 0; i < n;) {
      if (s[i] == '2') {
        long long cnt1 = 0;
        long long cnt2 = 1;
        j = i + 1;
        while (j < n and s[j] != '0') {
          (s[j] == '1') ? cnt1++ : cnt2++;
          j++;
        }
        for (k = 0; k < cnt1; k++) {
          ss += '1';
        }
        for (k = 0; k < cnt2; k++) {
          ss += '2';
        }
        i = j;
      } else {
        ss += s[i];
        i++;
      }
    }
    string sss = "";
    for (i = n - 1; i >= 0;) {
      if (ss[i] == '0') {
        long long cnt1 = 0;
        long long cnt0 = 1;
        j = i - 1;
        while (j >= 0 and ss[j] != '2') {
          (ss[j] == '1') ? cnt1++ : cnt0++;
          j--;
        }
        for (k = 0; k < cnt1; k++) {
          sss += '1';
        }
        for (k = 0; k < cnt0; k++) {
          sss += '0';
        }
        i = j;
      } else {
        sss += ss[i];
        i--;
      }
    }
    reverse(sss.begin(), sss.end());
    s = sss;
    ss = "";
    for (i = 0; i < n;) {
      if (s[i] == '2') {
        long long cnt1 = 0;
        long long cnt2 = 1;
        long long cnt0 = 0;
        j = i + 1;
        string s_ = "2";
        while (j < n) {
          if (s[j] == '1')
            cnt1++;
          else {
            s_ += s[j];
          }
          j++;
        }
        for (k = 0; k < cnt1; k++) {
          ss += '1';
        }
        ss += s_;
        i = j;
      } else {
        ss += s[i];
        i++;
      }
    }
    cout << ss << "\n";
  }
  return 0;
}
