#include <bits/stdc++.h>
using namespace std;
int dp[2010][2], cg[2010][2];
char a[100010];
int main() {
  scanf("%s", a);
  int n = strlen(a);
  for (int i = 0; i < n; i++) {
    if (a[i] == '1') {
      dp[i][1] = max(dp[i - 1][0], dp[i - 1][1]) + 1;
      dp[i][0] = dp[i - 1][0];
    } else {
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = dp[i - 1][1];
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == '1') {
      int ff = 1;
      memset(cg, 0, sizeof(cg));
      a[i] = '0';
      for (int j = 0; j < n; j++) {
        if (a[j] == '1') {
          cg[j][1] = max(cg[j - 1][0], cg[j - 1][1]) + 1;
          cg[j][0] = cg[j - 1][0];
        } else {
          cg[j][0] = cg[j - 1][0] + 1;
          cg[j][1] = cg[j - 1][1];
        }
      }
      for (int j = 0; j < n; j++) {
        if (max(dp[j][0], dp[j][1]) != max(cg[j][0], cg[j][1])) {
          ff = 0;
          break;
        }
      }
      if (!ff) a[i] = '1';
    }
  }
  printf("%s\n", a);
  return 0;
}
