#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  stack<int> st;
  bool ff[s.size()];
  int n = s.size();
  memset(ff, false, sizeof ff);
  for (long long i = 0; i < n; i++) {
    if (s[i] == '1') {
      st.push(i);
    } else {
      if (st.empty()) {
        ff[i] = true;
      } else {
        st.pop();
      }
    }
  }
  while (!st.empty()) {
    ff[st.top()] = true;
    st.pop();
  }
  for (long long i = 0; i < n; i++) {
    if (ff[i]) {
      s[i] = '0';
    }
  }
  cout << s << "\n";
}
