#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
string s;
struct Tree {
  int c0, c1, c;
} tree[maxn << 2];
void pushup(int rt) {
  tree[rt].c0 = tree[rt << 1].c0 + tree[rt << 1 | 1].c0;
  tree[rt].c1 = tree[rt << 1].c1 + tree[rt << 1 | 1].c1;
  tree[rt].c = max(tree[rt << 1].c + tree[rt << 1 | 1].c1,
                   tree[rt << 1].c0 + tree[rt << 1 | 1].c);
}
void buildtree(int rt, int l, int r) {
  if (l == r) {
    tree[rt].c = 1;
    if (s[l - 1] == '0')
      tree[rt].c0 = 1, tree[rt].c1 = 0;
    else
      tree[rt].c1 = 1, tree[rt].c0 = 0;
    return;
  }
  int mid = (l + r) >> 1;
  buildtree(rt << 1, l, mid);
  buildtree(rt << 1 | 1, mid + 1, r);
  pushup(rt);
}
void update(int rt, int l, int r, int p, int val) {
  if (l == r) {
    if (val)
      tree[rt].c1 = 1, tree[rt].c0 = 0;
    else
      tree[rt].c0 = 1, tree[rt].c1 = 0;
    return;
  }
  int mid = (l + r) >> 1;
  if (p <= mid)
    update(rt << 1, l, mid, p, val);
  else
    update(rt << 1 | 1, mid + 1, r, p, val);
  pushup(rt);
}
int main() {
  cin >> s;
  int n = s.size();
  buildtree(1, 1, n);
  int c = tree[1].c;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      update(1, 1, n, i + 1, 0);
      if (tree[1].c == c)
        s[i] = '0';
      else
        update(1, 1, n, i + 1, 1);
    }
  }
  cout << s << endl;
  return 0;
}
