#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
long long A[1000005];
long long B[1000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long tst = 1;
  for (long long tt = 1; tt <= tst; tt++) {
    long long cnt = 0;
    string s;
    cin >> s;
    for (long long i = ((long long)(s).size()) - 1; i >= 0; i--) {
      if (s[i] == '0')
        cnt++;
      else if (cnt)
        cnt--;
      else
        s[i] = '0';
    }
    cout << s << endl;
  }
  return 0;
}
