#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s, t = s;
  int a = 0, b = 0;
  reverse(t.begin(), t.end());
  for (int i = 0; i < (int)s.size(); i++) {
    if (t[i] == '1') {
      a++;
      if (a > b) t[i] = '0', b++;
    } else {
      b++;
    }
  }
  reverse(t.begin(), t.end());
  cout << t << "\n";
  return 0;
}
