#include <bits/stdc++.h>
using namespace std;
int lis(string s) {
  int n = s.size();
  int l0 = 0;
  int l1 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      l1 = 1 + max(l0, l1);
    } else {
      l0 = 1 + l0;
    }
  }
  return max(l1, l0);
}
int main() {
  string s;
  cin >> s;
  string t = s;
  int n = s.size();
  for (int i = 0; i < n; i++) {
    if (s[i] == '1') {
      t[i] = '0';
      if (lis(s) == lis(t)) {
        s = t;
      } else {
        t[i] = '1';
      }
    }
  }
  cout << s << endl;
  return 0;
}
