#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 13;
const double eps = 1e-7;
const double pi = acos(-1.0);
char s[maxn];
int a[maxn];
int dp[maxn];
int res[maxn];
int out[maxn];
int main(void) {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> s;
  int len = strlen(s);
  for (int i = 0; i < len; i++) a[i] = s[i] - '0';
  fill(dp, dp + maxn, 3);
  int mx = 0;
  for (int i = 0; i < len; i++) {
    int p = upper_bound(dp, dp + maxn, a[i]) - dp;
    dp[p] = a[i];
    mx = max(mx, p);
    res[i] = mx + 1;
  }
  int ans = 0;
  for (int i = len - 1; i > 0; i--) {
    if (res[i] == res[i - 1]) {
      ans++;
      out[i] = 0;
    } else if (res[i] != res[i - 1] && ans) {
      ans--;
      out[i] = 1;
    } else
      out[i] = 0;
  }
  int i = 0;
  while (ans != 0) {
    if (out[i] == 0) {
      out[i] = 1;
      ans--;
    }
    i++;
  }
  for (int i = 0; i < len; i++) cout << out[i];
  return 0;
}
