#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && (c != '-')) c = getchar();
  if (c == '-') f = -1, c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
const int N = 1e5 + 10;
int n, ans[N], suf[N], f[N];
char s[N];
int main() {
  scanf("%s", s + 1), n = strlen(s + 1);
  for (register int i = (n); i >= (1); i--) suf[i] = suf[i + 1] + (s[i] == '1');
  for (int l = n, r = n; l; r = --l) {
    while (l && s[l - 1] == s[l]) --l;
    if (s[l] == '0')
      for (register int i = (r); i >= (l); i--)
        f[i] = max(f[r + 1] + (r - i + 1), suf[r + 1] + (r - i + 1));
    else
      for (register int i = (r); i >= (l); i--) f[i] = max(f[r + 1], suf[i]);
  }
  for (register int i = (n); i >= (1); i--) {
    if (f[i + 1] + 1 == f[i])
      ans[i] = '0';
    else
      ans[i] = '1';
  }
  for (register int i = (1); i <= (n); i++) printf("%c", ans[i]);
}
