#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  long long n = (long long)s.size();
  string ans(n, '0');
  stack<long long> st;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      st.push(i);
    } else {
      if (!st.empty()) {
        ans[st.top()] = '1';
        st.pop();
      }
    }
  }
  cout << ans << '\n';
}
