#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<bool> s;
  s.reserve(100000);
  for (char c; cin >> c;) {
    s.push_back(c == '1');
  }
  unsigned int s2 = 0;
  for (auto it = s.rbegin(); it != s.rend(); it++) {
    if (*it) {
      if (s2 > 0) {
        s2--;
      } else {
        *it = false;
      }
    } else {
      s2++;
    }
  }
  for (auto b : s) {
    cout << b ? '1' : '0';
  }
  cout << endl;
  return 0;
}
