#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, maxn = 100007, mod = 1e9 + 7;
const long long linf = 0x3f3f3f3f3f3f3f3fLL;
const long long P = 19260817;
char s[maxn];
char ss[maxn];
int cnt = 0;
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == '0')
      cnt++, ss[i] = '0';
    else if (!cnt)
      ss[i] = '0';
    else
      cnt--, ss[i] = '1';
  }
  printf("%s", ss);
  return 0;
}
