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