#include <bits/stdc++.h>
char buf[100010];
struct node {
  char x;
  int cnt;
} IN[100010], TMP[100010], *in, *tmp;
int len;
void zip() {
  int bak = 0;
  tmp[0] = in[0];
  for (int i = 1; i < len; ++i)
    if (in[i].x == tmp[bak].x)
      tmp[bak].cnt += in[i].cnt;
    else
      tmp[++bak] = in[i];
  std::swap(tmp, in);
  len = bak + 1;
}
void output() {
  for (int i = 0; i < len; ++i)
    for (int j = 1; j <= in[i].cnt; ++j) putchar(in[i].x);
  putchar(10);
}
int main() {
  in = IN;
  tmp = TMP;
  scanf("%s", buf);
  len = strlen(buf);
  for (int i = 0; i < len; ++i) in[i].x = buf[i], in[i].cnt = 1;
  zip();
  bool flag = true;
  int lim;
  lim = sqrt(len) + 1;
  while (flag) {
    int cur = 0;
    int ct = 0;
    flag = false;
    for (int i = 1; i < len; ++i) {
      int now = i;
      bool flag2 = false;
      while (now && in[now].x == '0' && in[now - 1].x == '1') {
        std::swap(in[now], in[now - 1]);
        flag2 = flag = true;
        --now;
      }
      if (flag2 && ++ct % lim == 0) zip();
    }
    if (flag) zip();
  }
  flag = true;
  lim = sqrt(len) + 1;
  int cnt2 = 0;
  while (flag) {
    int cur = 0;
    int ct = 0;
    flag = false;
    for (int i = 1; i < len; ++i) {
      int now = i;
      bool flag2 = false;
      while (now && in[now].x == '1' &&
             (in[now - 1].x == '2' || in[now - 1].x == '0')) {
        std::swap(in[now], in[now - 1]);
        flag2 = flag = true;
        --now;
      }
      if (flag2 && ++ct % lim == 0) zip();
    }
    if (flag) zip();
  }
  flag = true;
  lim = sqrt(len) + 1;
  while (flag) {
    int cur = 0;
    int ct = 0;
    flag = false;
    for (int i = 1; i < len; ++i) {
      int now = i;
      bool flag2 = false;
      while (now && in[now].x == '0' && in[now - 1].x == '1') {
        std::swap(in[now], in[now - 1]);
        flag2 = flag = true;
        --now;
      }
      if (flag2 && ++ct % lim == 0) zip();
    }
    if (flag) zip();
  }
  flag = true;
  lim = sqrt(len) + 1;
  while (flag) {
    int cur = 0;
    int ct = 0;
    flag = false;
    for (int i = 1; i < len; ++i) {
      int now = i;
      bool flag2 = false;
      while (now && in[now].x == '1' && in[now - 1].x == '2') {
        std::swap(in[now], in[now - 1]);
        flag2 = flag = true;
        --now;
      }
      if (flag2 && ++ct % lim == 0) zip();
    }
    if (flag) zip();
  }
  flag = true;
  lim = sqrt(len) + 1;
  while (flag) {
    int cur = 0;
    int ct = 0;
    flag = false;
    for (int i = 1; i < len; ++i) {
      int now = i;
      bool flag2 = false;
      while (now && in[now].x == '0' && in[now - 1].x == '1') {
        std::swap(in[now], in[now - 1]);
        flag2 = flag = true;
        --now;
      }
      if (flag2 && ++ct % lim == 0) zip();
    }
    if (flag) zip();
  }
  output();
  return 0;
}
