#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
string s;
int cnt;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  cnt = 0;
  for (int i = s.length() - 1; i >= 0; i--) {
    if (s[i] == '0')
      cnt--;
    else {
      cnt++;
      if (cnt > 0) {
        cnt = 0;
        s[i] = '0';
      }
    }
  }
  cout << s << endl;
  return 0;
}
