#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string str;
  cin >> str;
  int n = str.size();
  vector<int> v;
  string ans = str;
  for (int i = 0; i < n; i++) {
    if (str[i] == '1') {
      v.emplace_back(i);
    } else {
      if (v.size() != 0) {
        v.pop_back();
      }
    }
  }
  for (int i = 0; i < v.size(); i++) {
    ans[v[i]] = '0';
  }
  cout << ans << "\n";
  return 0;
}
