#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e+9;
int main() {
  string s;
  cin >> s;
  int i = s.size() - 1, count[2] = {0, 0}, now = 0;
  for (; i >= 0; i--) {
    if (s[i] == '0')
      break;
    else
      s[i] = '0';
  }
  for (; i >= 0; i--) {
    count['1' == s[i]]++;
    if (s[i] == '0') now++;
    if (i == 0 || s[i] == '0' && s[i - 1] == '1') {
      if (count[1] + now > count[0]) {
        for (int j = now + i; j < now + now + i + count[1] - count[0]; j++)
          s[j] = '0';
        count[0] = now;
        count[1] = 0;
      }
      now = 0;
    }
  }
  cout << s;
}
