#include <bits/stdc++.h>
inline int read() {
  int fa = 1, x = 0;
  char ch = getchar();
  while (!(ch >= '0' && ch <= '9')) {
    if (ch == '-') fa *= -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return fa * x;
}
int sum, len;
char s[100000 + 2];
int main() {
  scanf("%s", s + 1);
  len = strlen(s + 1);
  for (int i = len; i >= 1; i--) {
    if (s[i] == '0')
      sum++;
    else {
      if (sum > 0)
        sum--;
      else
        s[i] = '0';
    }
  }
  printf("%s\n", s + 1);
}
