#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  stack<pair<char, int> > stk;
  for (int i = 0; i < s.size(); i++) {
    pair<char, int> cur = {s[i], i};
    if (s[i] == '1')
      stk.push(cur);
    else {
      if (!stk.empty())
        stk.pop();
      else
        s[i] = '0';
    }
  }
  while (!stk.empty()) s[stk.top().second] = '0', stk.pop();
  cout << s << "\n";
  return 0;
}
