#include <bits/stdc++.h>
using namespace std;
string s;
int len, sum;
int main() {
  cin >> s;
  len = s.size();
  for (int i = len - 1; i >= 0; i--) {
    if (s[i] == 48)
      sum++;
    else if (sum)
      sum--;
    else
      s[i] = 48;
  }
  cout << s << endl;
  return 0;
}
