#include <bits/stdc++.h>
using namespace std;
string str;
int N;
string ans;
bool can(int p) {
  int c1 = 0, c0 = 0;
  for (int i = p + 1; i <= N - 1; i++) {
    c1 += str[i] == '1';
    c0 += str[i] == '0';
    if (c0 > c1) return 0;
  }
  return 1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> str;
  N = str.size();
  ans = str;
  for (int i = 0; i <= N - 1; i++) {
    if (str[i] == '0') continue;
    if (can(i)) ans[i] = '0';
  }
  cout << ans << '\n';
  return 0;
}
