#include <bits/stdc++.h>
using namespace std;
long long const MX = 1e5 + 10;
long long const INF = 1e9;
int DX[4] = {1, 0, 0, -1};
int DY[4] = {0, -1, 1, 0};
char dc[4] = {'D', 'L', 'R', 'U'};
int a[MX];
int res[MX];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s;
  int n = s.size();
  int numz = 0, ls = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '0') {
      numz++;
      a[i] = max(numz, ls);
      ls = max(ls, numz);
    } else {
      int tmp = max(numz, ls) + 1;
      a[i] = tmp;
      ls = max(ls, a[i]);
    }
  }
  res[0] = 0;
  int j = 0;
  for (int i = 1; i < n; i++) {
    if (a[i] != a[i - 1]) {
      res[i] = 0;
      j = i;
      continue;
    }
    res[i] = 0;
    while (j >= 0) {
      if (res[j] == 1) {
        j--;
        continue;
      }
      if (a[j - 1] == a[j] - 1) {
        res[j] = 1;
        j--;
        break;
      }
      j--;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << res[i];
  }
  return 0;
}
