#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int inf = 1e9;
const long double eps = 1e-8;
const int mod = 1e9 + 7;
string s;
string t;
int main() {
  cin >> s;
  int i = s.size() - 1;
  int cnt2 = 0;
  while (true) {
    int cnt1 = 0;
    if (i < 0) {
      reverse((t).begin(), (t).end());
      return cout << t << endl, 0;
    }
    while (s[i] == '0' && i >= 0) {
      cnt2++;
      i--;
      t += "0";
    }
    while (s[i] == '1' && i >= 0) {
      cnt1++;
      i--;
    }
    int x = min(cnt1, cnt2);
    for (int i = (int)1; i <= (int)x; i++) {
      t += "1";
    }
    cnt1 -= x;
    cnt2 -= x;
    for (int i = (int)1; i <= (int)cnt1; i++) {
      t += "0";
    }
  }
}
