#include <bits/stdc++.h>
using namespace std;
pair<int, int> stk[200001];
char str[200001];
int top;
int main() {
  scanf("%s", str + 1);
  int len = (int)strlen(str + 1);
  for (int i = 1; i <= len; i++) {
    if (top == 0 || str[i] == '1')
      stk[++top] = make_pair(i, 1);
    else {
      if (stk[top].second == 1 && str[i] == '0')
        --top;
      else {
        stk[++top] = make_pair(i, str[i] - '0');
      }
    }
  }
  for (int i = 1; i <= top; i++) str[stk[i].first] = '0';
  puts(str + 1);
  return 0;
}
