#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  int not_erased_zeros_num = 0;
  for (int i = signed(s.size()) - 1; i >= 0; i--)
    if (s[i] == '0')
      not_erased_zeros_num++;
    else if (not_erased_zeros_num)
      not_erased_zeros_num--;
    else
      s[i] = '0';
  cout << s << "\n";
  return 0;
}
