#include <bits/stdc++.h>
using namespace std;
char ch[100016];
int n, book[100016];
stack<pair<char, int> > S;
int main() {
  scanf("%s", ch);
  n = strlen(ch);
  for (int i = 0; i < n; ++i)
    if (ch[i] == '0' && !S.empty() && S.top().first == '1')
      S.pop();
    else
      S.push(make_pair(ch[i], i));
  while (!S.empty()) {
    if (S.top().first == '1') book[S.top().second] = 1;
    S.pop();
  }
  for (int i = 0; i < n; ++i) putchar(book[i] ? '0' : ch[i]);
}
