#include <bits/stdc++.h>
using namespace std;
string s;
char A[100004];
int n;
long long dp[100004][2];
long long calc1(int i, int j) {
  if (i >= n) return 0;
  if (dp[i][j] != -1) return dp[i][j];
  long long z = 0;
  if (j == 0) {
    z = 1 + calc1(i + 1, A[i] == '1');
  } else {
    if (A[i] == '1') {
      z = 1 + max(z, calc1(i + 1, 1));
    }
  }
  z = max(z, calc1(i + 1, j));
  return dp[i][j] = z;
}
long long sum[100004];
int main() {
  cin >> s;
  n = s.size();
  memset(dp, -1, sizeof dp);
  int x = 0;
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '1') x++;
    sum[i] = x;
  }
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '0') {
      A[i] = '0';
    } else {
      long long z = sum[i];
      long long z2 = 1 + calc1(i + 1, 0);
      if (z == z2) {
        A[i] = '0';
      } else {
        A[i] = '1';
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << A[i] << "";
  }
  return 0;
}
