#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long M = 1e9 + 7;
const int N = 1e5 + 5;
const long long inf = 2e18;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  string t = s;
  int ct = 0;
  for (int i = n - 1; i >= 0; i--) {
    ct += s[i] == '0' ? 1 : -1;
    if (ct < 0) {
      t[i] = '0';
      ct = 0;
    }
  }
  cout << t << endl;
}
