#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
int n, ans[MAXN + 5], sta[MAXN + 5], top;
char s[MAXN + 5];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '1') {
      sta[++top] = i;
    } else {
      if (top) {
        ans[sta[top]] = 1;
        --top;
      }
    }
  }
  ans[n] = 0;
  for (int i = 1; i <= n; ++i) putchar('0' + ans[i]);
  puts("");
  return 0;
}
