#include <bits/stdc++.h>
using namespace std;
string s;
int ans = 0;
int main() {
  cin >> s;
  for (int i = (int)s.size() - 1; i >= 0; i--) {
    ans += (s[i] == '0' ? 1 : -1);
    if (ans == -1) {
      ++ans;
      s[i] = '0';
    }
  }
  cout << s << endl;
}
