#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
string s, ans;
int main() {
  cin >> s;
  int s0 = 0, s1 = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') {
      if (s0 <= s1)
        ans += "0";
      else
        ans += "1", s1++;
    } else {
      ans += "0";
      s0++;
    }
  }
  reverse(ans.begin(), ans.end());
  cout << ans << endl;
  return 0;
}
