#include <bits/stdc++.h>
using namespace std;
string s;
char ans[1000005];
int main() {
  cin >> s;
  int ch0 = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '0') {
      ans[i] = '0';
      ch0++;
    } else {
      if (!ch0)
        ans[i] = '0';
      else {
        ans[i] = '1';
        ch0--;
      }
    }
  }
  cout << (string)ans << endl;
  return 0;
}
