#include <bits/stdc++.h>
using namespace std;
char s[100005];
int len, tmp, maxx;
int main() {
  scanf("%s", s + 1);
  len = strlen(s + 1);
  for (int i = len; i >= 1; i--) {
    if (s[i] == '1')
      tmp++;
    else
      tmp--;
    if (tmp > maxx) {
      maxx = tmp;
      s[i] = '0';
    }
  }
  printf("%s", s + 1);
  return 0;
}
