#include <bits/stdc++.h>
using namespace std;
const long long inf = numeric_limits<long long>::max();
const long long maxn = 1e6 + 500;
inline void solve() {
  string str;
  cin >> str;
  long long ze = 0, one = 0;
  for (long long i = (long long)(str).size() - 1; i >= 0; --i) {
    if (str[i] == '0')
      ze++;
    else {
      if (ze == one) str[i] = '0', ze++;
      one++;
    }
  }
  cout << str << '\n';
}
signed main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ;
  solve();
}
