#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;
string s;
int a[3000], cnt[2], brp, ans[2010][2010], nol, n;
int main() {
  cin >> s;
  n = s.length();
  for (int i = 0; i < n; i++) a[i + 1] = s[i] - '0';
  for (int i = 1; i <= n; i++) {
    memset(cnt, 0, sizeof(cnt));
    brp = 0;
    for (int j = i; j <= n; j++) {
      cnt[a[j]]++;
      if (a[j] == 1) brp++;
      brp = max(brp, cnt[0]);
      ans[i][j] = brp;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) {
      bool boo = true;
      nol = 1;
      for (int j = i; j >= 1; j--) {
        int temp = ans[j][i];
        if (a[j] == 0) nol++;
        if (nol > temp) boo = false;
      }
      memset(cnt, 0, sizeof(cnt));
      brp = 0;
      a[i] = 0;
      for (int j = i; j <= n; j++) {
        cnt[a[j]]++;
        if (a[j] == 1) brp++;
        brp = max(brp, cnt[0]);
        if (brp > ans[i][j]) boo = false;
      }
      if (!boo) a[i] = 1;
    }
  }
  for (int i = 1; i <= n; i++) printf("%d", a[i]);
}
