#include <bits/stdc++.h>
using namespace std;
long long read() {
  char ch = getchar();
  long long x = 0;
  int op = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') op = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
  return x * op;
}
char s[100005];
int n, a[100005], tong[3];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = (1); i <= (n); i++) a[i] = s[i] - '0';
  for (int i = 1, j; i <= n; i = j + 1) {
    j = i;
    int mi = a[i], mx = a[i];
    while (j < n && max(a[j + 1], mx) - min(a[j + 1], mi) <= 1)
      j++, mx = max(mx, a[j]), mi = min(mi, a[j]);
    for (int k = (i); k <= (j); k++) tong[a[k]]++;
    int x = i;
    for (int k = (0); k <= (2); k++)
      for (int l = (1); l <= (tong[k]); l++) a[x++] = k;
    tong[0] = tong[1] = tong[2] = 0;
  }
  int p = -1;
  for (int i = (1); i <= (n); i++) {
    if (a[i] == 2) {
      p = i;
      break;
    }
    printf("%d", a[i]);
  }
  if (p != -1) {
    for (int i = (p + 1); i <= (n); i++)
      if (a[i] == 1) putchar('1');
    for (int i = (p); i <= (n); i++)
      if (a[i] != 1) printf("%d", a[i]);
  }
  return 0;
}
