#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
char s[100010], s2[100010];
int main() {
  scanf("%s", s);
  int l = strlen(s);
  strcpy(s2, s);
  for (int i = l - 1; i >= 0; i--) {
    if (s[i] == '1') {
      int c1 = 0, c0 = 0, j;
      for (j = i + 1; j < l; j++) {
        if (s[j] == '1')
          c1++;
        else
          c0++;
        if (c1 < c0) break;
      }
      if (j == l) s2[i] = '0';
    }
  }
  printf("%s\n", s2);
  return 0;
}
