#include <bits/stdc++.h>
using namespace std;
int arr[200000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  vector<int> out;
  int cnt = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '0') {
      cnt++;
      out.push_back(0);
    } else {
      cnt--;
      if (cnt >= 0) {
        out.push_back(1);
      } else {
        out.push_back(0);
      }
      cnt = max(cnt, 0);
    }
  }
  reverse(out.begin(), out.end());
  for (int x : out) cout << x;
  cout << endl;
}
