#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long dp[100005];
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  string s;
  cin >> s;
  long long sum = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (sum == 0 && s[i] == '1')
      s[i] = '0';
    else if (s[i] == '0')
      sum++;
    else if (s[i] == '1')
      sum--;
  }
  cout << s;
  return 0;
}
