#include <bits/stdc++.h>
using namespace std;
const int M = 1e5 + 5;
char s[M];
int f[M][2], g[M][2];
int main() {
  cin >> s + 1;
  int n = strlen(s + 1);
  for (int i = n; i; i--) {
    if (s[i] == '0') {
      g[i][0] = max(g[i + 1][0], g[i + 1][1]) + 1;
      g[i][1] = g[i + 1][1];
    } else {
      g[i][1] = g[i + 1][1] + 1;
      g[i][0] = g[i + 1][0];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == '1') {
      f[i][0] = f[i - 1][0];
      f[i][1] = max(f[i - 1][1], f[i - 1][0]) + 1;
    } else {
      f[i][0] = f[i - 1][0] + 1;
      f[i][1] = f[i - 1][1];
    }
    if (s[i] == '1') {
      int pre = f[i - 1][0] + 1;
      int bk = max(g[i + 1][1], g[i + 1][0]) + 1;
      if (pre == f[i][1] && bk == g[i][1]) {
        s[i] = '0';
        f[i][0] = pre;
        f[i][1] = f[i - 1][1];
      }
    }
  }
  cout << s + 1 << endl;
  return 0;
}
