#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string x;
  cin >> x;
  int c = 0;
  for (int i = x.length() - 1; i >= 0; i--) {
    if (x[i] == '0') {
      c++;
    } else {
      if (c == 0) {
        x[i] = '0';
      }
      if (c > 0) {
        c--;
      }
    }
  }
  cout << x;
  return 0;
}
