#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-6;
inline int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
inline void fre() {}
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch <= '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
int main() {
  string s;
  cin >> s;
  int cnt = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '0')
      cnt++;
    else {
      if (cnt) {
        cnt--;
      } else {
        s[i] = '0';
      }
    }
  }
  cout << s << endl;
}
