#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
char s[N];
int cnt;
int main() {
  cin >> (s + 1);
  int len = strlen(s + 1);
  for (int i = len; i >= 1; i--) {
    if (s[i] == '0')
      cnt++;
    else if (s[i] == '1') {
      if (cnt == 0)
        s[i] = '0';
      else
        cnt--;
    }
  }
  cout << (s + 1) << endl;
  return 0;
}
