#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
string s;
long long one[2001], zero[2001];
long long solve2(long long n) {
  zero[0] = 0;
  if (s[0] == '0') zero[0]++;
  for (long long i = 1; i < n; ++i) {
    zero[i] = zero[i - 1];
    if (s[i] == '0') zero[i]++;
  }
  one[n - 1] = 0;
  if (s[n - 1] == '1') one[n - 1]++;
  for (int i = n - 1 - 1; i >= 0; i--) {
    one[i] = one[i + 1];
    if (s[i] == '1') one[i]++;
  }
  long long ans = 0;
  for (long long i = 0; i < n; ++i) ans = max(ans, zero[i] + one[i]);
  return ans;
}
void solve() {
  cin >> s;
  long long n = s.length();
  long long ans = solve2(n);
  for (long long i = 0; i < n; ++i) {
    if (s[i] == '1') {
      s[i] = '0';
      if (ans != solve2(n)) s[i] = '1';
    }
  }
  cout << s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
  cerr << "Time elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
}
