#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
char s[N], t[N];
int n, m, h, f[N];
void func(int i) {
  t[i] = '0', h = 0;
  for (int i = 1; i <= n; ++i) f[i] = f[i - 1] + (t[i] == '0');
  for (int i = 0; i <= n; ++i) h = max(f[i] + (n - f[n]) - (i - f[i]), h);
  if (h != m) t[i] = '1';
}
int main() {
  scanf("%s", s + 1), n = strlen(s + 1);
  for (int i = 1; i <= n; ++i) f[i] = f[i - 1] + (s[i] == '0'), t[i] = s[i];
  for (int i = 0; i <= n; ++i) m = max(f[i] + (n - f[n]) - (i - f[i]), m);
  for (int i = 1; i <= n; ++i)
    if (t[i] == '1') func(i);
  printf("%s\n", t + 1);
  return 0;
}
