#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long tt, i, j, k, n, m, x, y, ans;
  tt = 1;
  while (tt--) {
    string s;
    cin >> s;
    n = s.size();
    vector<long long> used(n), v;
    for (long long p = 0; p < n; p++) {
      if (s[p] == '1')
        v.push_back(p);
      else if (!v.empty()) {
        used[p] = used[v.back()] = 1;
        v.pop_back();
      }
    }
    for (long long p = 0; p < n; p++) {
      if (used[p])
        cout << s[p];
      else
        cout << "0";
    }
  }
  return 0;
}
