#include <bits/stdc++.h>
using namespace std;
mt19937 rnd;
const int maxn = 1e5 + 10;
int pref[2][maxn], suf[2][maxn];
int d[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  int n = s.size();
  s = '$' + s + '$';
  if (s[1] == '0')
    pref[0][1]++;
  else
    pref[1][1]++;
  for (int i = 2; i <= n; i++) {
    pref[0][i] = pref[0][i - 1];
    pref[1][i] = pref[1][i - 1];
    if (s[i] == '0')
      pref[0][i]++;
    else
      pref[1][i]++;
  }
  pref[0][n + 1] = pref[0][n];
  pref[1][n + 1] = pref[1][n];
  if (s[n] == '0')
    suf[0][n]++;
  else
    suf[1][n]++;
  for (int i = n - 1; i >= 1; i--) {
    suf[0][i] = suf[0][i + 1];
    suf[1][i] = suf[1][i + 1];
    if (s[i] == '0')
      suf[0][i]++;
    else
      suf[1][i]++;
  }
  int x = -1;
  for (int i = 1; i <= n; i++) {
    d[i] = pref[0][i - 1] + 1 + suf[1][i + 1];
    x = max(x, d[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == '0') continue;
    int y = -1;
    for (int j = 1; j < i; j++) {
      y = max(y, d[j] - 1);
    }
    y = max(y, d[i]);
    for (int j = i + 1; j <= n; j++) {
      y = max(y, d[j] + 1);
    }
    if (x == y) {
      s[i] = '0';
      for (int j = 1; j < i; j++) d[j]--;
      for (int j = i + 1; j <= n; j++) d[j]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << s[i];
}
