#include <bits/stdc++.h>
using namespace std;
const int mod = 100003;
const int inf = 0x3f3f3f3f;
const double eps = 1e-6;
const int maxn = (int)1e5 + 7;
const int maxm = 300;
char s[maxn];
int main() {
  scanf("%s", s + 1);
  int len = strlen(s + 1), zero = 0, one = 0;
  for (int i = len; i >= 1; i--) {
    if (s[i] == '0') zero++;
    if (s[i] == '1') {
      if (zero < one + 1)
        s[i] = '0';
      else
        one++;
    }
  }
  printf("%s", s + 1);
  return 0;
}
