#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') continue;
    bool flag = 1;
    int cnt = 0;
    for (int j = i - 1; j >= 0; j--) {
      if (s[j] == '0')
        cnt++;
      else
        cnt--;
      if (cnt < 0) {
        flag = 0;
      }
    }
    cnt = 0;
    for (int j = i + 1; j < s.size(); j++) {
      if (s[j] == '1')
        cnt++;
      else
        cnt--;
      if (cnt < 0) {
        flag = 0;
      }
    }
    if (flag) s[i] = '0';
  }
  cout << s << endl;
}
int main() { solve(); }
