#include <bits/stdc++.h>
using namespace std;
template <typename F, typename S>
ostream &operator<<(ostream &os, const pair<F, S> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  typename vector<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "[";
  typename set<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename T>
ostream &operator<<(ostream &os, const unordered_set<T> &v) {
  os << "[";
  typename unordered_set<T>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const map<F, S> &v) {
  os << "[";
  typename map<F, S>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << it->first << ": " << it->second;
  }
  return os << "]";
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const unordered_map<F, S> &v) {
  os << "[";
  typename unordered_map<F, S>::const_iterator it;
  for (it = v.begin(); it != v.end(); it++) {
    if (it != v.begin()) os << ", ";
    os << it->first << ": " << it->second;
  }
  return os << "]";
}
string s;
int n;
void read_input() {
  cin >> s;
  n = s.size();
}
void solve() {
  list<pair<char, int>> t;
  for (int i = 0; i < n; i++) t.push_back({s[i], i});
  list<pair<char, int>>::iterator it1, it2;
  it1 = it2 = t.begin();
  while (it1 != t.end()) {
    it2 = next(it1);
    if (it1->first == '1' && it2->first == '0') {
      it1 = t.erase(it1);
      it1 = t.erase(it1);
      it1 = (it1 == t.begin()) ? it1 : prev(it1);
    } else {
      it1++;
    }
  }
  for (auto c : t) {
    s[c.second] = '0';
  }
  cout << s << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  read_input();
  solve();
  return 0;
}
