#include <bits/stdc++.h>
#pragma optimize("O3")
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e18 + 7;
const int base = 2e5 + 1;
const int MAX = 1e5 + 2;
const double EPS = 1e-9;
const double PI = acos(-1.);
const int MAXN = 3 * 1e5 + 47;
long long d[MAXN][3], a[MAXN], b[MAXN];
int main() {
  string s;
  cin >> s;
  vector<int> v((int)s.size(), 0);
  vector<int> a;
  for (long long i = (0); i < ((int)s.size()); ++i) {
    if ((int)a.size() && s[i] == '0' && s[a.back()] == '1') {
      v[i] = 1;
      v[a.back()] = 1;
      a.pop_back();
    } else
      a.push_back(i);
  }
  for (long long i = (0); i < ((int)s.size()); ++i) {
    if (!v[i]) {
      s[i] = '0';
    }
  }
  cout << s;
  return 0;
}
