#include <bits/stdc++.h>
using namespace std;
const long long N = 2000;
string s;
long long n;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  n = s.length();
  long long diff = 0;
  long long i = n - 1;
  while (i >= 0) {
    if (s[i] == '1') {
      while (diff > 0 && s[i] == '1') {
        i--;
        diff--;
      }
      while (s[i] == '1') {
        s[i] = '0';
        i--;
      }
    } else {
      diff++;
      i--;
    }
  }
  cout << s << endl;
  return 0;
}
