#include <bits/stdc++.h>
using namespace std;
int main() {
  int len, a[100010], zero, last, temp;
  char s[100010], ans[100010];
  stack<int> st;
  scanf("%s", s);
  len = strlen(s);
  zero = last = 0;
  for (int i = 0; i < len; i++) {
    a[i] = ((s[i] == '0') ? max(zero, last - 1) : last) + 1;
    zero += ((s[i] == '0') ? 1 : 0);
    last = a[i];
  }
  zero = last = 0;
  for (int i = 0; i < len; i++) {
    if (s[i] == '0') {
      temp = max(zero + 1, last);
      if (temp > a[i]) {
        ans[st.top()] = '1';
        st.pop();
        zero--;
      }
      ans[i] = '0';
      zero++;
      last = a[i];
    } else {
      last = a[i];
      ans[i] = '0';
      zero++;
      st.push(i);
    }
  }
  for (int i = 0; i < len; i++) putchar(ans[i]);
  printf("\n");
  return 0;
}
