#include <bits/stdc++.h>
using namespace std;
int n, cha[100001];
string str;
set<pair<int, int> > s;
set<int> ind;
int main() {
  cin >> str;
  int n = str.size();
  for (int i = 0; i < n; i++) s.insert({i, str[i] == '1'});
  while (!s.empty()) {
    if (s.begin()->second == 0) {
      if (!ind.empty()) {
        ind.erase(--ind.end());
      }
    } else
      ind.insert(s.begin()->first);
    s.erase(s.begin());
  }
  for (int i = 0; i < n; i++) {
    if (!ind.empty() and i == *(ind.begin())) {
      cout << "0";
      ind.erase(ind.begin());
    } else
      cout << str[i];
  }
  cout << '\n';
}
