#include <bits/stdc++.h>
const int inf = 1e7 + 7;
long long mod = 1e9 + 7;
const double eps = 1e-9;
using namespace std;
int num[1000005];
char s[1000005];
int main() {
  cin >> s;
  int len = strlen(s);
  num[len] = 0;
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] == '0')
      num[i] = num[i + 1] - 1;
    else {
      num[i] = num[i + 1] + 1;
      if (num[i] > 0) {
        num[i] = 0;
        s[i] = '0';
      }
    }
  }
  cout << s << endl;
  return 0;
}
