#include <bits/stdc++.h>
using namespace std;
long long int INF = 1e18;
const long long fact_table = 1200008;
double Pi = 3.1415926535897932384626;
priority_queue<long long> pql;
priority_queue<pair<long long, long long> > pqp;
priority_queue<pair<long long, long long> > bag;
priority_queue<long long, vector<long long>, greater<long long> > pqls;
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               greater<pair<long long, long long> > >
    pqps;
long long dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
long long dy[8] = {0, 1, 0, -1, 1, -1, -1, 1};
char dir[] = "DRUL";
long long mypow(long long number1, long long number2, long long mod) {
  if (number2 == 0) {
    return 1ll;
  } else {
    long long number3 = mypow(number1, number2 / 2, mod);
    number3 *= number3;
    number3 %= mod;
    if (number2 % 2 == 1) {
      number3 *= number1;
      number3 %= mod;
    }
    return number3;
  }
}
void YES(bool condition) {
  if (condition) {
    cout << "YES"
         << "\n";
    ;
  } else {
    cout << "NO"
         << "\n";
    ;
  }
  return;
}
void Yes(bool condition) {
  if (condition) {
    cout << "Yes"
         << "\n";
    ;
  } else {
    cout << "No"
         << "\n";
    ;
  }
  return;
}
bool multicase = false;
long long n, m, num, sum, a, b, c, d, e, h, q;
long long w, k, l, r;
long long x[500005], y[500005], z[500005];
long long cost[105][105];
string s;
void solve() {
  cin >> s;
  n = s.size();
  vector<pair<long long, long long> > v;
  for (long long i = 0; i < n; i++) {
    if (i == 0) {
      v.push_back(pair<long long, long long>(s[i], i));
    } else if (s[i] == '0' && v.back().first == '1') {
      v.pop_back();
    } else {
      v.push_back(pair<long long, long long>(s[i], i));
    }
  }
  for (long long i = 0; i < v.size(); i++) {
    long long idx = v[i].second;
    s[idx] = '0';
  }
  for (long long i = 0; i < s.size(); i++) {
    cout << (s[i]);
    ;
  }
  cout << endl;
  ;
  return;
}
int main() {
  long long q;
  if (multicase) {
    cin >> q;
  } else {
    q = 1;
  }
  while (q--) {
    solve();
  }
  return 0;
}
