#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool uin(T& a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
inline bool uax(T& a, T b) {
  return a < b ? (a = b, true) : false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  for (int i = (int)s.length() - 1, cnt = 0; i >= 0; --i) {
    if (s[i] == '0')
      ++cnt;
    else if (cnt)
      --cnt;
    else
      s[i] = '0';
  }
  cout << s << '\n';
}
