#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  string s;
  cin >> s;
  int n = s.length();
  for (int i = 0; i < n; i++) {
    a[i + 1] = s[i] - '0';
  }
  int sum = 0;
  for (int i = n; i >= 1; i--) {
    if (a[i]) {
      if (sum) {
        sum--;
      } else {
        a[i] = 0;
      }
    } else {
      sum++;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << a[i];
  }
  cout << endl;
  return 0;
}
