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