#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
char str[2010];
int dp[2010], mx[2010];
int main() {
  cin >> str;
  int L = strlen(str);
  dp[0] = 1;
  mx[0] = 0;
  for (int i = 0; i < L; i++) {
    if (str[i] - '0' == 1) {
      dp[i] = mx[i - 1] + 1;
      mx[i] = max(mx[i - 1], dp[i]);
    } else {
      int tem = 0;
      for (int j = i - 1; j >= 0; j--) {
        if (str[j] - '0' == 0) {
          tem = dp[j];
          break;
        }
      }
      dp[i] = tem + 1;
      mx[i] = max(mx[i - 1], dp[i]);
    }
  }
  for (int i = 0; i < L; i++) {
    if (str[i] - '0' == 0) continue;
    int fla = 1;
    for (int j = i + 1; j < L; j++)
      if (str[j] - '0' == 0) {
        if (dp[j] == mx[j]) {
          fla = 0;
          break;
        }
      }
    if (fla == 0) continue;
    str[i] = '0';
    for (int j = i + 1; j < L; j++)
      if (str[j] - '0' == 0) {
        dp[j]++;
      }
  }
  cout << str << endl;
  return 0;
}
