#include <bits/stdc++.h>
using namespace std;
int pref[100002];
char ans[100002];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(100);
  int n;
  string s;
  cin >> s;
  n = s.size();
  pref[0] = 0;
  int mx = 0;
  string t;
  int suf = 0;
  for (int i = n - 1; i > -1; i--) {
    if (s[i] == '0')
      suf--;
    else
      suf++;
    if (s[i] == '0') {
      ans[i] = '0';
    } else {
      if (suf - mx <= 0) {
        ans[i] = '1';
      } else
        ans[i] = '0';
    }
    if (suf > mx) mx = suf;
  }
  for (int i = 0; i < n; i++) cout << ans[i];
  return 0;
}
