#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e5 + 5;
int n;
char s[mxn], res[mxn];
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> (s + 1);
  n = strlen(s + 1);
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    res[i] = s[i];
    if (s[i] == '0') {
      if (!v.empty()) {
        res[v.back()] = '1';
        v.pop_back();
      }
    } else {
      res[i] = '0';
      v.push_back(i);
    }
  }
  cout << (res + 1);
  return 0;
}
