#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s, t = s;
  for (int i = s.size() - 1, cnt = 0; i >= 0; i--) {
    if (s[i] == '0') {
      cnt++;
      continue;
    }
    while (s[i] == '1' && i >= 0) {
      if (cnt == 0)
        s[i] = '0';
      else
        cnt = max(0, cnt - 1);
      i--;
    }
    i++;
  }
  cout << s;
}
