#include <bits/stdc++.h>
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int dxx[8] = {0, 0, 1, -1, -1, -1, 1, 1};
int dyy[8] = {1, -1, 0, 0, -1, 1, 1, -1};
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  stack<pair<int, int> > ss;
  for (long long int i = 0; i < s.size(); i++) {
    if (!ss.empty() && s[i] == '0' && ss.top().first == 1)
      ss.pop();
    else
      ss.push({s[i] - '0', i});
  }
  while (!ss.empty()) {
    s[ss.top().second] = '0';
    ss.pop();
  }
  cout << s << endl;
  return 0;
}
