#include <bits/stdc++.h>
using namespace std;
long long MAX = 1000 * 1000 * 1000;
int main() {
  string s;
  cin >> s;
  stack<long long> fordelete;
  for (long long i = 0; i < s.size(); i++) {
    if (s.at(i) == '1') {
      fordelete.push(i);
    } else if (fordelete.size() != 0) {
      fordelete.pop();
    }
  }
  while (!fordelete.empty()) {
    s.at(fordelete.top()) = '0';
    fordelete.pop();
  }
  cout << s;
  return 0;
}
