#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
int main() {
  string s;
  cin >> s;
  int cnt1 = 0, cnt2 = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (cnt1 == cnt2 && s[i] == '1') {
      s[i] = '0';
    } else if (s[i] == '1') {
      cnt1++;
    } else {
      cnt2++;
    }
  }
  cout << s;
}
