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