#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int tree[8 * N], arr[N];
int dp0[N], dp1[N], t0[N], t1[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  string t;
  cin >> s;
  t = s;
  int n = s.length();
  int su = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '0') {
      su--;
      continue;
    } else {
      if (su >= 0) t[i] = '0';
      su++;
      su = min(0, su);
    }
  }
  cout << t << endl;
}
