#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  string s;
  cin >> s;
  string t = s;
  int n = s.size();
  auto check = [&]() {
    for (int i = 0; i <= 0; i++) {
      int mx0 = 0, mx1 = 0, mmx0 = 0, mmx1 = 0;
      for (int j = i; j < n; j++) {
        if (s[j] == '1') {
          mx1 = max(mx1 + 1, mx0 + 1);
        } else {
          mx0++;
        }
        if (t[j] == '1') {
          mmx1 = max(mmx1 + 1, mmx0 + 1);
        } else {
          mmx0++;
        }
        if (max(mx0, mx1) != max(mmx0, mmx1)) {
          return 0;
        }
      }
    }
    return 1;
  };
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') continue;
    s[i] = '0';
    if (!check()) {
      s[i] = '1';
    }
  }
  cout << s << "\n";
}
