#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244853;
char a[100050];
int main() {
  scanf("%s", a);
  int lena = strlen(a);
  int count0 = 0;
  for (int i = lena - 1; i >= 0; i--) {
    if (a[i] == '0') {
      count0++;
    } else {
      count0--;
    }
    if (count0 < 0) {
      count0++;
      a[i] = '0';
    }
  }
  printf("%s", a);
  printf("\n");
  return 0;
}
