#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); ++i) {
    int t0 = 0, t1 = 0;
    if (s[i] == '1') {
      bool ok = 1;
      for (int j = i + 1; j < s.size(); ++j) {
        if (s[j] == '0')
          t0++;
        else
          t1++;
        if (t0 > t1) ok = 0;
      }
      if (ok) s[i] = '0';
    }
  }
  cout << s << endl;
  return 0;
}
