#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  vector<int> o;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1')
      o.push_back(i);
    else if (o.size())
      o.pop_back();
  }
  for (int i : o) s[i] = '0';
  cout << s << '\n';
}
