#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
char c[N];
int locked[N];
int n, q[N], top;
int main() {
  scanf("%s", c + 1);
  n = strlen(c + 1);
  for (int i = 1; i <= n; i++) {
    if (top == 0 || c[q[top]] == '0' || c[i] == '1') {
      q[++top] = i;
      continue;
    }
    locked[q[top]] = 1;
    locked[i] = 1;
    top--;
  }
  for (int i = 1; i <= n; i++)
    if (locked[i])
      printf("%c", c[i]);
    else
      printf("0");
}
