#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n;
char ss[N], ans[N];
int minn[N * 3], add[N * 3];
void addMin(int a, int c) {
  minn[a] += c;
  add[a] += c;
}
void pushDown(int a) {
  addMin(a << 1, add[a]), addMin(a << 1 | 1, add[a]);
  add[a] = 0;
}
void update(int a) { minn[a] = min(minn[a << 1], minn[a << 1 | 1]); }
bool query(int a, int l, int r, int ll, int rr) {
  if (ll > rr) return true;
  if (l == ll && r == rr) return minn[a] >= 0;
  pushDown(a);
  int mid = l + r >> 1;
  if (rr <= mid)
    return query(a << 1, l, mid, ll, rr);
  else if (ll > mid)
    return query(a << 1 | 1, mid + 1, r, ll, rr);
  else
    return query(a << 1, l, mid, ll, mid) &&
           query(a << 1 | 1, mid + 1, r, mid + 1, rr);
}
void modify(int a, int l, int r, int ll, int rr, int c) {
  if (l == ll && r == rr) {
    addMin(a, c);
    return;
  }
  int mid = l + r >> 1;
  if (rr <= mid)
    modify(a << 1, l, mid, ll, rr, c);
  else if (ll > mid)
    modify(a << 1 | 1, mid + 1, r, ll, rr, c);
  else
    modify(a << 1, l, mid, ll, mid, c),
        modify(a << 1 | 1, mid + 1, r, mid + 1, rr, c);
  update(a);
}
int main() {
  scanf("%s", ss + 1), n = strlen(ss + 1);
  ans[n + 1] = '\0';
  for (int i = n; i >= 1; --i) {
    if (ss[i] == '1') {
      if (query(1, 1, n, i + 1, n))
        ans[i] = '0';
      else
        ans[i] = '1';
      modify(1, 1, n, i, n, 1);
    } else {
      ans[i] = '0';
      modify(1, 1, n, i, n, -1);
    }
  }
  printf("%s\n", ans + 1);
  return 0;
}
