#include <bits/stdc++.h>
using namespace std;
int flag[3000500];
int dp[200050];
int maxx[200050];
int ans[200050];
stack<int> st;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    ans[i] = 0;
    if (s[i] == '1') st.push(i);
    if (s[i - 1] == '1' && s[i] == '0') {
      int j = i;
      while (!st.empty() && s[j] == '0' && j < n) {
        int temp = st.top();
        st.pop();
        ans[temp] = 1;
        j++;
        i = j - 1;
      }
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i];
  return 0;
}
