#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-18;
const double DEPS = 1e-9;
const long double PI = 3.141592653589793238;
const long long MOD = 998244353;
const int N = (int)(5e5) + 1;
void inp() {}
void out() {}
long long gcd(long long fx, long long fy) {
  if (!fy) return fx;
  return gcd(fy, fx % fy);
}
inline void fill(int* ar, int sz, int val) {
  for (int i = 0; i < sz; i++) {
    ar[i] = val;
  }
}
int n;
char x[N];
int main() {
  scanf("%s", x);
  n = strlen(x);
  for (int z = 0, i = n - 1; i >= 0; i--) {
    if (x[i] == '1' && !z) {
      x[i] = '0';
    } else {
      z += (x[i] == '0');
      z -= (x[i] == '1');
      z = max(z, 0);
    }
  }
  printf("%s", x);
}
