#include <bits/stdc++.h>
using namespace std;
using INT = long long;
using pii = pair<int, int>;
stack<pii> q;
char s[2200];
int ans[2200];
int main() {
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  memset(ans, 0, sizeof ans);
  for (int i = 1; i <= n; i++) {
    if (q.empty())
      q.push(pii(i, s[i] - '0'));
    else {
      auto p = q.top();
      if (p.second == 1 and s[i] == '0') {
        ans[p.first] = 1;
        q.pop();
      } else
        q.push(pii(i, s[i] - '0'));
    }
  }
  for (int i = 1; i <= n; i++) printf("%d", ans[i]);
  return 0;
}
