#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e6 + 7;
const int INF = 1e9;
const long long INFF = 1e18;
char s[maxn];
int main() {
  int num0 = 0, num1 = 0;
  cin >> s;
  int l = strlen(s);
  for (int i = l - 1; i >= 0; i--) {
    if (s[i] == '0') {
      num0++;
    } else {
      if (num1 >= num0) {
        s[i] = '0';
      } else {
        num1++;
      }
    }
  }
  cout << s << endl;
  return 0;
}
