#include <bits/stdc++.h>
using namespace std;
void solve();
int main() { solve(); }
void solve() {
  string s;
  cin >> s;
  vector<bool> mark(s.length(), false);
  int zero_count = 0;
  int j;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] == '0') {
      mark[i] = true;
      ++zero_count;
    } else {
      j = i - 1;
      while (zero_count) {
        if (j >= 0 && mark[j] == false && s[j] == '1') {
          mark[j] = true;
          --zero_count;
        }
        --j;
        if (zero_count == 0 || j < 0) break;
      }
      zero_count = 0;
    }
  }
  j = s.length() - 1;
  while (zero_count) {
    if (j >= 0 && mark[j] == false && s[j] == '1') {
      mark[j] = true;
      --zero_count;
    }
    --j;
    if (zero_count == 0 || j < 0) break;
  }
  for (int i = 0; i < s.length(); ++i) {
    if (mark[i]) {
      cout << s[i];
    } else {
      cout << '0';
    }
  }
  cout << endl;
}
