#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10, INF = 0x0f0f0f0f;
const long long mod = 1e9 + 7, LINF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-10, Pi = 2 * acos(0);
const int M = 12000005;
int n, m, k;
char s[N];
char t[N];
void solve() {
  scanf("%s", s);
  int len = strlen(s);
  int cnt1 = 0, cnt0 = 0;
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] == '0')
      t[i] = '0', cnt0++;
    else {
      if (cnt1 == cnt0) {
        t[i] = '0';
        cnt0++;
        cnt1++;
      } else {
        t[i] = '1';
        cnt1++;
      }
    }
  }
  printf("%s\n", t);
}
int main() {
  int T, ce = 1, flag = 1;
  solve();
  return 0;
}
