#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
#pragma GCC optimize("fast-math")
using namespace std;
const int DEBUG = 0;
mt19937 gen(
    (unsigned)chrono::high_resolution_clock::now().time_since_epoch().count());
#pragma comment(linker, "/STACK:16777216")
const int N = (int)1e5 + 100;
int pref[N][2];
int suff[N][2];
void calcArrays(const string& s) {
  for (char c = '0'; c <= '1'; c++) {
    int sum = 0;
    for (int i = 0; i < s.size(); i++) {
      sum += (s[i] == c);
      pref[i][c - '0'] = sum;
    }
    sum = 0;
    for (int i = s.size() - 1; i >= 0; i--) {
      sum += (s[i] == c);
      suff[i][c - '0'] = sum;
    }
  }
}
int calcVals(const string& s) {
  int val = 0;
  for (int i = 0; i < s.size(); i++) {
    int c = s[i] - '0';
    int val1 = pref[i][0] + suff[i + 1][0];
    int val2 = pref[i][1] + suff[i + 1][1];
    int val3 = pref[i][0] + suff[i][1];
    val = max(val, val1);
    val = max(val, val2);
    val = max(val, val3);
  }
  return val;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(cout.fixed);
  cout.precision(2);
  auto START_TIME = chrono::high_resolution_clock::now();
  string s;
  cin >> s;
  calcArrays(s);
  int initVals = calcVals(s);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '0') continue;
    s[i] = '0';
    int ok = 1;
    calcArrays(s);
    int newVals = calcVals(s);
    if (newVals != initVals) ok = 0;
    if (!ok) s[i] = '1';
  }
  cout << s;
  return 0;
}
