#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const int N = 100005;
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  string s, ans;
  cin >> s;
  long long int cnt1 = 0, cnt0 = 0;
  for (long long int i = s.size() - 1; i >= 0; i--) {
    if (cnt1 == cnt0) {
      if (s[i] == '0') cnt0++;
      ans += '0';
    } else {
      if (s[i] == '0')
        cnt0++;
      else
        cnt1++;
      ans += s[i];
    }
  }
  reverse(ans.begin(), ans.end());
  return cout << ans, 0;
}
