#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int MAXN = 1e6 + 10;
const long long MOD = 1e9 + 7;
const long long MOD2 = 998244353;
const long long INF = 8e18;
const int LOG = 20;
long long pw(long long a, long long b, long long mod) {
  return (!b ? 1
             : (b & 1 ? (a * pw(a * a % mod, b / 2, mod)) % mod
                      : pw(a * a % mod, b / 2, mod)));
}
int n, ans, cnt0, cnt1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  string s;
  cin >> s;
  int n = (int)s.size();
  for (int i = n - 1; ~i; i--) {
    if (s[i] == '0') {
      ans++;
      cnt0 = ans;
    } else {
      cnt1++;
      if (cnt1 > ans) {
        ans = cnt1;
        s[i] = '0';
      }
    }
  }
  cout << s;
  return 0;
}
