#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 9;
char a[2005];
int main() {
  int n, r, ans = 0;
  cin >> a;
  int l = strlen(a);
  int k = 1, n1 = 0, n0 = 0;
  for (int i = l - 1; i >= 0; --i) {
    if (n1 == n0) {
      if (a[i] == '1')
        a[i] = '0';
      else
        n0++;
      continue;
    }
    if (a[i] == '0') {
      n0++;
    } else
      n1++;
  }
  cout << a << endl;
  return 0;
}
