#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
char num[maxn];
char ans[maxn];
int cha[maxn];
stack<pair<int, int> > s;
int main() {
  scanf("%s", num + 1);
  int len = int(strlen(num + 1));
  for (int i = 1; i <= len; i++) {
    if (num[i] == '1')
      cha[i] = cha[i - 1] + 1;
    else
      cha[i] = cha[i - 1] - 1;
  }
  s.push(make_pair(len, cha[len]));
  for (int i = len - 1; i >= 1; i--) {
    pair<int, int> tmp = s.top();
    if (cha[i] < tmp.second) s.push(make_pair(i, cha[i]));
  }
  for (int i = 1; i < len; i++) {
    if (num[i] == '0') {
      ans[i] = '0';
      continue;
    }
    pair<int, int> tmp = s.top();
    while (tmp.first <= i) {
      s.pop();
      tmp = s.top();
    }
    if (tmp.second - cha[i] >= 0)
      ans[i] = '0';
    else
      ans[i] = '1';
  }
  ans[len] = '0';
  printf("%s\n", ans + 1);
  return 0;
}
