#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 10;
string S;
int cnt = 0;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> S;
  reverse(S.begin(), S.end());
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == '0')
      cnt++;
    else {
      if (cnt)
        cnt--;
      else
        S[i] = '0';
    }
  }
  reverse(S.begin(), S.end());
  cout << S << endl;
  return 0;
}
