#include <bits/stdc++.h>
using namespace std;
string s;
string answer;
void In() { cin >> s; }
void Solve() {
  answer = s;
  stack<pair<char, int>> stk;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '1')
      stk.push({s[i], i});
    else {
      if (!stk.empty() && stk.top().first == '1')
        stk.pop();
      else
        stk.push({s[i], i});
    }
  }
  while (!stk.empty()) {
    answer[stk.top().second] = '0';
    stk.pop();
  }
}
void Out() { cout << answer << endl; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  In();
  Solve();
  Out();
}
