#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> s;
  n = s.size();
  int cur = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (s[i] == '0')
      ++cur;
    else {
      if (cur == 0)
        s[i] = '0';
      else
        --cur;
    }
  }
  cout << s << endl;
  return 0;
}
