#include <bits/stdc++.h>
using namespace std;
signed main() {
  string s;
  cin >> s;
  long long n = s.length();
  stack<long long> index;
  for (long long i = 0; i < n; i++) {
    if (s[i] == '0') {
      if (!index.empty()) index.pop();
    } else
      index.push(i);
  }
  while (!index.empty()) {
    long long x = index.top();
    index.pop();
    s[x] = '0';
  }
  cout << s << "\n";
  return 0;
}
