#http://codeforces.com/problemset/problem/920/A
#solved
n = int(input())

for i in range(n):
    f, a = list(map(int, input().split()))
    taps = sorted(list(map(int, input().split())))
    max_todo = max(taps[0] - 1, f - taps[-1])

    for t in range(a):
        if t != a - 1:
            if round((taps[t + 1] - taps[t]) / 2) > max_todo:
                max_todo = round((taps[t + 1] - taps[t]) / 2)

    print(max_todo + 1)


#http://codeforces.com/problemset/problem/920/A
#solved
n = int(input())

for i in range(n):
    f, a = list(map(int, input().split()))
    taps = sorted(list(map(int, input().split())))
    max_todo = max(taps[0] - 1, f - taps[-1])

    for t in range(a):
        if t != a - 1:
            if round((taps[t + 1] - taps[t]) / 2) > max_todo:
                max_todo = round((taps[t + 1] - taps[t]))

    print(max_todo + 1)


#http://codeforces.com/problemset/problem/920/A
#solved
from math import ceil
n = int(input())

for i in range(n):
    f, a = list(map(int, input().split()))
    taps = sorted(list(map(int, input().split())))
    max_todo = max(taps[0] - 1, f - taps[-1])

    for t in range(a):
        if t != a - 1:
            if ceil((taps[t + 1] - taps[t] - 1) / 2) > max_todo:
                max_todo = ceil((taps[t + 1] - taps[t] - 1) / 2)

    print(max_todo + 1)


t = int(input())

for i in range(t):
    n, k = map(int, input().split())
    taps = list(map(int, input().split()))

    garden = [0] * n

    for i in range(k):
        garden[(taps[i]-1)] = 1 # 1 means watered 0 means still

    count = k
    sec = 1
    while count < n:
        sec += 1
        for i in range(k):
            left = ((taps[i] - 1) - (sec - 1))
            right = ((taps[i] - 1) + (sec - 1))
            if left >= 0 and garden[left] == 0:
                count += 1
                garden[left] = 1
            if right <n and garden[right] == 0:
                count += 1
                garden[right] = 1

    print(sec)


import math
t = int(input())
x = []
ans = []
for i in range(t):
    n,k = input().split()
    n = int(n)
    k = int(k)
    m = 0
    x = input().split()
    for j in range(len(x)):
        x[j] = int(x[j])
        if j>0:
            m = max((x[j]-x[j-1])//2+1,m)
    m = max(m,n-x[k-1]+1)
    m = max(m,x[0])
    x = []
    ans.append(m)
for i in range(len(ans)):
    print(ans[i])


import math
t = int(input())
x = []
ans = []
for i in range(t):
    n,k = input().split()
    n = int(n)
    k = int(k)
    m = 0
    x = input().split()
    for j in range(len(x)):
        x[j] = int(x[j])
        if j>0:
            if (x[j]-x[j-1])%2==0:
                m = max((x[j]-x[j-1])//2,m)
            if (x[j]-x[j-1])%2==1:
                m = max((x[j]-x[j-1])//2+1,m)
    m = max(m,n-x[k-1]+1)
    m = max(m,x[0])
    x = []
    ans.append(m)
for i in range(len(ans)):
    print(ans[i])


for _ in range(int(input())):
    n,k=map(int,input().split())
    arr=list(map(int,input().split()))
    water=[0]*n
    ans,j=1,0
    for i in range(k):
        water[arr[i]-1]=1
    while(sum(water)<n):
        ans+=1
        j+=1
        for i in range(k):
            if(arr[i]-1+j<n):
                water[arr[i]-1+j]=1
            if(arr[i]-1-j>=0):
                water[arr[i]-1-j]=1
    print(ans)


import math
for _ in range(int(input())):
    n=int(input())
    arr=list(map(int,input().split()))
    temp=n-1
    brr=arr.copy()
    crr=[]
    i,j=0,len(brr)-1
    while(i<=j):
        #print(i,j)
        if(i==j):
            crr.append(brr[i])
            break
        elif(brr[i]<brr[j]):
            crr.append(brr[i])
            i+=1
        else:
            crr.append(brr[j])
            j-=1
    flag=0
    for i in range(1,len(crr)):
        if(crr[i-1]>crr[i]):
            flag=1
            break
    if(flag==0):
        print(0)
    else:
        for k in range(temp):
            brr=arr[k+1:]
            crr=[]
            i,j=0,len(brr)-1
            while(i<=j):
                if(i==j):
                    crr.append(brr[i])
                    break
                elif(brr[i]<brr[j]):
                    crr.append(brr[i])
                    i+=1
                else:
                    crr.append(brr[j])
                    j-=1
            flag=0
            for i in range(1,len(crr)):
                if(crr[i-1]>crr[i]):
                    flag=1
                    break
            if(flag==0):
                print(n-len(crr))
                break


t=int(input())
for i in range(t):
	n,k=map(int,input().split())
	a=input().split()
	a=list(map(int,a))
	ans=0
	for j in range(k):
		if j==0:
			ans=max(ans,a[j])
		else:
			ans=max(ans,(a[j]-a[j-1]+2)//2)
		if j==k-1:
			ans=max(ans,n-a[j]+1)
		else:
			ans=max(ans,(a[j+1]-a[j]+2)//2)
	print(ans)


for jiwojdilanmdw in range(int(input())):
    n, k = [int(x) for x in input().split()]
    M = 0
    l = [int(x) for x in input().split()]
    for i in range(1,k):
        if l[i] - l[i-1] > M:
            M = l[i] - l[i-1]
        M = M // 2 + 1
    print(max(l[0], M, n-l[-1]+1))


for jiwojdilanmdw in range(int(input())):
    n, k = [int(x) for x in input().split()]
    M = 0
    l = [int(x) for x in input().split()]
    for i in range(1,k):
        if l[i] - l[i-1] > M:
            M = l[i] - l[i-1]
    else:
        M = M // 2 + 1
    print(max(l[0], M, n-l[-1]+1))


for t in range(int(input())):

	[n,k]=[int(x) for x in input().split()]

	xi = [int(x) for x in input().split()]

	ans = max([xi[0],n-xi[-1]+1]+[(xi[i]-xi[i-1]+2)//2 for i in range(1,k)])

	print(ans)

# Made By Mostafa_Khaled


import sys
import math
t=int(input())
for i in range(t):
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    maxi=a[0]
    for j in range(0,k-1):
        p=a[j+1]-a[j]+1
        if p%2 ==1:
            p=p//2+1
        else:
            p=p//2
        maxi=max(maxi,p)
    maxi=max(maxi,n-a[k-1]+1)
    print(maxi)


import sys
t=int(input())
for i in range(t):
    n,k=map(int,input().split())
    a=list(map(int,input().split()))
    maxi=a[0]
    for j in range(1,k-1):
        maxi=max(maxi,(a[j+1]-a[j]+1)//2)
    maxi=max(maxi,n-a[k-1]+1)
    print(maxi)


t = int(input())

for i in range(t):
    n, k = list(map(int, input().rstrip().split()))
    taps = list(map(int, input().rstrip().split()))
    a = [0] * (n + 1)

    time = 1
    while(1):
        for i in range(len(taps)):
            #print(a)
            if(taps[i] - (time - 1) > 0):
                a[taps[i] - (time - 1)] = 1
            if(taps[i] + (time - 1) <= n):
                a[taps[i] + (time - 1)] = 1

        if(a.count(1) == n):
            break
        time += 1

    print(time)


import math
n=int(input())
for i in range(0,n):
	n,k=input().split()
	n=int(n)
	k=int(k)
	y=list(map(int,input().split()))
	x=y[0]
	o=len(y)-1
	for j in range(1,len(y)):
		a=math.floor((y[j]-y[j-1])/2)+1
		if(a>x):
			x=a

	if((n-y[o])>=x):
		b=n-y[o]+1
		x=b

	print(x)


import math
n=int(input())
for i in range(0,n):
	n,k=input().split()
	n=int(n)
	k=int(k)
	y=list(map(int,input().split()))
	x=y[0]
	o=len(y)-1
	for j in range(1,len(y)):
		a=math.floor((y[j]-y[j-1])/2)+1
		if(a>x):
			x=a

	if((n-y[o])>x):
		o=len(y)-1
		b=n-y[o]+1
		x=b

	print(x)


def solve(g, c, m):
    gaps = []
    l = 0
    for i in range(1, g+1):
        if i in m and l == 0:
            gaps.append(i - l - 1)
##            print(i - l - 1, 'x')
            l = i
        elif i in m and l != 0:
            gaps.append((i - l - 1) // 2)
##            print((i - l - 1) // 2, 'y')
            l = i
    gaps.append(g - l)
##    print(gaps)
    print(max(gaps) + 1)

t = int(input())
for i in range(t):
    n, k = map(int, input().split())
    a = [int(x) for x in input().split()]
    solve(n, k, a)


from math import ceil
def solve(g, c, m):
    gaps = [m[0] - 1, g - m[-1]]
    l = 0
    for i in range(1, c):
        gaps.append(ceil((m[i] - m[i-1] -1) / 2))
    print(max(gaps) + 1)

t = int(input())
for i in range(t):
    n, k = map(int, input().split())
    a = [int(x) for x in input().split()]
    solve(n, k, a)


t = int(input())

for test in range(t):
  n, k = map(int, input().split())
  poss = list(map(int, input().split()))

  res = max(poss[0], n - poss[-1] + 1)
  for i in range(1, k):
    res = max(res, (poss[i] - poss[i - 1] + 2) // 2)
  print(res)


t = int(input())

for test in range(t):
  n, k = map(int, input().split())
  poss = list(map(int, input().split()))

  res = max(poss[0], n - poss[-1] + 1)
  for i in range(1, k):
    res = max(res, (poss[i] - poss[i - 1]) // 2)
  print(res)


t=int(input())
for i in range(t):
 count=1
 n,k=map(int,input().split())
 garden=[0 for num in range(n)]
 a=input().split(" ")
 b=[int(x) for x in a]
 for number in b:
    garden[number-1]=1
 while 0 in garden:
    sequence=[]
    for number in range(len(garden)):
        if garden[number]==1:
            sequence.append(number)
    for number in sequence:
        if number+1<len(garden):
            garden[number+1]=1
        if number-1>=0:
            garden[number-1]=1
        garden[number]=2
    count+=1
 print(count)


import math
t = int(input())
for i in range(t):
    n, k = [int(s) for s in input().split()]
    array = [int(s) for s in input().split()]
    if len(array) == 1:
        print(max(abs(array[0]), abs(n - array[0] + 1)))
        continue
    #array.insert(0, 1)
    #array.append(n)
    max_ = -1
    for i in range(1, len(array)):
        if array[i] - array[i - 1] > max_:
            max_ = array[i] - array[i - 1]
    ans = math.ceil(max_ / 2)
    sec = max(abs(array[0]), abs(n - array[-1] + 1))
    #print(ans,sec)
    print(max(sec, ans))


import math
t = int(input())
for i in range(t):
    n, k = [int(s) for s in input().split()]
    array = [int(s) for s in input().split()]
    if len(array) == 1:
        print(max(abs(array[0]), abs(n - array[0] + 1)))
        continue
    #array.insert(0, 1)
    #array.append(n)
    max_ = -1
    for i in range(1, len(array)):
        if array[i] - array[i - 1] > max_:
            max_ = array[i] - array[i - 1]
    ans = math.ceil(max_ / 2)
    sec = max(abs(array[0] - 1), abs(array[-1] - n))
    #print(ans,sec)
    print(max(sec, ans))


import math
t = int(input())
for i in range(t):
    n, k = [int(s) for s in input().split()]
    array = [int(s) for s in input().split()]
    if len(array) == 1:
        print(max(abs(array[0]), abs(n - array[0] + 1)))
        continue
    #array.insert(0, 1)
    #array.append(n)
    max_ = -1
    for i in range(1, len(array)):
        if array[i] - array[i - 1] > max_:
            max_ = array[i] - array[i - 1]
    ans = math.ceil((max_ + 2) / 2)
    sec = max(abs(array[0]), abs(n - array[-1] + 1))
    #print(ans,sec)
    print(max(sec, ans))


import math
t = int(input())
for i in range(t):
    n, k = [int(s) for s in input().split()]
    array = [int(s) for s in input().split()]
    if len(array) == 1:
        print(max(abs(array[0]), abs(n - array[0] + 1)))
        continue
    #array.insert(0, 1)
    #array.append(n)
    max_ = -1
    for i in range(1, len(array)):
        if array[i] - array[i - 1] + 1 > max_:
            max_ = array[i] - array[i - 1] + 1
    ans = math.ceil(max_ / 2)
    sec = max(abs(array[0]), abs(n - array[-1] + 1))
    #print(ans,sec)
    print(max(sec, ans))


t = int(input())
while t > 0:
    n, k = map(int, input().split(" "))
    x = list(map(int, input().split(" ")))
    #print(x)
    nList = list(0 if i not in x else 1 for i in range(1, n + 1))
    #print(nList)
    s = 1
    while 0 in nList:
        nList = [1 if ((i > 0 and nList[i-1] == 1) or (i < len(nList) - 1 and nList[i+1] == 1)) else nList[i] for i in range(len(nList))]
        #print(nList)
        s += 1
    print(s)
    t -= 1


t = int(input())
while t > 0:
    n, k = map(int, input().split(" "))
    x = list(map(int, input().split(" ")))
    #print(x)
    nList = list(0 if i not in x else 1 for i in range(1, n + 1))
    #print(nList)
    s = 1
    while 0 in nList:
        nList = [1 if ((i > 0 and nList[i-1] == 1) or (i < len(nList) - 1 and nList[i+1] == 1)) else nList[i] for i in range(len(nList))]
        print(nList)
        s += 1
    print(s)
    t -= 1


t = int(input())
for i in range(t):
    n, k = map(int, input().split())
    ll = list(map(int, input().split()))
    dist = []
    for i in range(k-1):
        dist.append(ll[i+1] - ll[i])
    m = 0
    if dist != []:
        m = max(dist)
        m = m // 2 + 1
    f_l = ll[0]
    f_r = n - ll[-1] + 1
    m = max(m, f_l, f_r)
    print(m)


test=int(input())
for i in range(0,test):
    n,k=map(int,input().split(' '))
    a=list(map(int,input().split(' ')))
    t=1
    l=[0]*n
    for j in range(0,k):
        l[a[j]-1]=1
    while l.count(1)!=n:
        for j in range(0,k):
            l[min(n-1,(a[j]-1+t))]=1
            l[max(0,(a[j]-1-t))]=1
        t+=1
    print(t)


//codeforces_1009_B_live

import java.io.*;
import java.util.*;
import static java.lang.Math.*;
import java.math.*;

public class acm {

    public static void main(String[] args) throws IOException {
        BufferedReader gi = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter go = new PrintWriter(System.out);
        String line = gi.readLine();
        char[] liinnee = line.toCharArray();
        Stack<Integer> twos = new Stack<>();
        for (int i = 0; i < liinnee.length-1; i++) {
            if (liinnee[i] == '2'){
                twos.push(i);
            }
        }
        int ones = 0;
        char[] arr = new char[liinnee.length];
        Arrays.fill(arr, '0');
        int temp;
        int index = 0;
        for (int i = liinnee.length-1; i >= 0; i--) {
            if (twos.isEmpty()){
                index = i;
                break;
            }
            if (liinnee[i] == '1'){ ones++; }
            else if (i==twos.peek()){
                arr[twos.peek()+ones] = '2';
                temp = twos.pop();
                for (int j = temp+ones-1; j >= temp; j--) {
                    arr[j] = '1';
                }
            }
        }
        ones = 0;
        for (int i = 0; i <= index; i++) {
            ones += liinnee[i]=='1'?1:0;

        }
        for (int i = index-ones+1; i <= index; i++) {
            arr[i] = '1';
        }
        go.println(arr);

        go.close();
    }

    static long[] parseArray(BufferedReader gi) throws IOException{
        String[] line = gi.readLine().split(" ");
        long[] ans = new long[line.length];
        for (int i = 0; i < line.length; i++) {
            ans[i] = Integer.parseInt(line[i]);
        }
        return ans;
    }
}


import java.io.BufferedInputStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.*;

import static java.util.Arrays.*;
import static java.lang.Math.*;

public class B {

	Scanner scan;
	public B(Scanner s) {
		this.scan = s;
	}

	public void solve() {

		String s= scan.next();
		if(s.contains("1")){
			char[]c = s.toCharArray();
			sort(c);
			System.out.println(new String(c));
		}else System.out.println(s);
	}
	int intLine(){
		return Integer.parseInt(scan.nextLine());
	}
	int[] arr(){
		int n = scan.nextInt();
		int[]A = new int[n];
		for(int i=0;i<n;i++)A[i]=scan.nextInt();
		return A;
	}
	public static void main(String[] args) throws Exception{
		Locale.setDefault(Locale.US);
		new B(new Scanner(System.in)).solve();
	}
}


import java.io.BufferedInputStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.*;

import static java.util.Arrays.*;
import static java.lang.Math.*;

public class B {

	Scanner scan;
	public B(Scanner s) {
		this.scan = s;
	}

	public void solve() {

		String s= scan.next();

		char[]c = s.toCharArray();
		int c0=0;int c1=0;
		StringBuffer sb = new StringBuffer();
		if(!s.contains("2")){
			sort(c);
			System.out.println(new String(c));
			return;
		}
		int fc =s.indexOf('2');
		for(int i=0;i<fc;i++){
			if(c[i]=='0')sb.append('0');
		}
		for(int i=0;i<c.length;i++){
			if(c[i]=='1')sb.append('1');
		}
		for(int i=fc;i<s.length();i++){
			if(c[i]!='1')sb.append(c[i]);
		}

		System.out.println(sb.toString());
	}
	int intLine(){
		return Integer.parseInt(scan.nextLine());
	}
	int[] arr(){
		int n = scan.nextInt();
		int[]A = new int[n];
		for(int i=0;i<n;i++)A[i]=scan.nextInt();
		return A;
	}
	public static void main(String[] args) throws Exception{
		Locale.setDefault(Locale.US);
		new B(new Scanner(System.in)).solve();
	}
}


import java.io.BufferedInputStream;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.*;

import static java.util.Arrays.*;
import static java.lang.Math.*;

public class B {

	Scanner scan;
	public B(Scanner s) {
		this.scan = s;
	}

	public void solve() {

		String s= scan.next();

		char[]c = s.toCharArray();
		int c0=0;int c1=0;
		StringBuffer sb = new StringBuffer();
		if(!s.contains("2")){
			sort(c);
			System.out.println(new String(c));
		}
		int fc =s.indexOf('2');
		for(int i=0;i<fc;i++){
			if(c[i]=='0')sb.append('0');
		}
		for(int i=0;i<c.length;i++){
			if(c[i]=='1')sb.append('1');
		}
		for(int i=fc;i<s.length();i++){
			if(c[i]!='1')sb.append(c[i]);
		}

		System.out.println(sb.toString());
	}
	int intLine(){
		return Integer.parseInt(scan.nextLine());
	}
	int[] arr(){
		int n = scan.nextInt();
		int[]A = new int[n];
		for(int i=0;i<n;i++)A[i]=scan.nextInt();
		return A;
	}
	public static void main(String[] args) throws Exception{
		Locale.setDefault(Locale.US);
		new B(new Scanner(System.in)).solve();
	}
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyBufferedReader in = new MyBufferedReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, MyBufferedReader in, PrintWriter out) {
            String s = in.readLine();
            if (!s.contains("2")) {
                out.println(s.chars().sorted().toString());
            } else {
                String[] a = s.split("2", 2);
                int num0sBefore = (int) a[0].chars().filter(c -> c == '0').count();
                int numOnes = (int) s.chars().filter(c -> c == '1').count();
                String s1 = a[1].chars().filter(c -> c != '1').collect(StringBuilder::new,
                                                                       StringBuilder::appendCodePoint, StringBuilder::append).toString();
                out.println(Utils.repeatStr("0", num0sBefore) + Utils.repeatStr("1", numOnes) +
                                "2" +
                                s1);
            }
        }

    }

    static class Utils {
        public static String repeatStr(String s, int times) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < times; i++) {
                sb.append(s);
            }
            return sb.toString();
        }

    }

    static class MyBufferedReader {
        BufferedReader in;

        public MyBufferedReader(InputStream s) {
            this.in = new BufferedReader(new InputStreamReader(s));
        }

        public MyBufferedReader(BufferedReader in) {
            this.in = in;
        }

        public String readLine() {
            String res = null;

            try {
                res = in.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return res;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyBufferedReader in = new MyBufferedReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, MyBufferedReader in, PrintWriter out) {
            char[] nums = in.readLine().toCharArray();
            int num1s = 0;
            int num0sBefore1st2 = 0;
            boolean two = false;
            for (char num : nums) {
                if (num == '0') {
                    if (!two) {
                        num0sBefore1st2++;
                    }
                } else if (num == '1') {
                    num1s++;
                } else {
                    two = true;
                }
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < num0sBefore1st2; i++) {
                sb.append('0');
            }

            for (int i = 0; i < num1s; i++) {
                sb.append('1');
            }

            two = false;

            for (char num : nums) {
                if (num == '0') {
                    if (two) {
                        sb.append('0');
                    }
                } else if (num == '2') {
                    two = true;
                    sb.append('2');
                }
            }
            out.println(sb.toString());
        }

    }

    static class MyBufferedReader {
        BufferedReader in;

        public MyBufferedReader(InputStream s) {
            this.in = new BufferedReader(new InputStreamReader(s));
        }

        public MyBufferedReader(BufferedReader in) {
            this.in = in;
        }

        public String readLine() {
            String res = null;

            try {
                res = in.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return res;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.stream.Stream;
import java.io.BufferedReader;
import java.util.stream.Collector;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyBufferedReader in = new MyBufferedReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, MyBufferedReader in, PrintWriter out) {
            String s = in.readLine();
            if (!s.contains("2")) {
                out.println(s.chars().sorted().boxed().collect(Strings.charsToString()));
            } else {
                String[] a = s.split("2", 2);
                int num0sBefore = (int) a[0].chars().filter(c -> c == '0').count();
                int numOnes = (int) s.chars().filter(c -> c == '1').count();
                String s1 = a[1].codePoints().filter(c -> c != '1').boxed().collect(Strings
                                                                                .charsToString());
                out.println(Utils.repeatStr("0", num0sBefore) + Utils.repeatStr("1", numOnes) +
                                "2" +
                                s1);
            }
        }

    }

    static class Strings {
        public static Collector<Integer, ?, String> charsToString() {
            return Collector.of(
                StringBuilder::new,
                StringBuilder::appendCodePoint,
                StringBuilder::append,
                StringBuilder::toString);
        }

    }

    static class Utils {
        public static String repeatStr(String s, int times) {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < times; i++) {
                sb.append(s);
            }
            return sb.toString();
        }

    }

    static class MyBufferedReader {
        BufferedReader in;

        public MyBufferedReader(InputStream s) {
            this.in = new BufferedReader(new InputStreamReader(s));
        }

        public MyBufferedReader(BufferedReader in) {
            this.in = in;
        }

        public String readLine() {
            String res = null;

            try {
                res = in.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return res;
        }

    }
}


import java.util.*;
/**
 *
 * @author comp
 */
public class Olimp {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s=in.next();
        int f[]=new int[s.length()];
        for (int i = 0; i < s.length(); i++) {
            f[i]=s.charAt(i)-'0';
        }
        boolean fl=true;
        ArrayList<Integer> a=new ArrayList<>();
        for (int i = 0; i < s.length()+1; i++) {
            if(i==s.length()){
                Collections.sort(a);
                for (int j: a) {
                    System.out.print(j);
                }
                return;
            }
            if(f[i]==0 && fl==false){
                Collections.sort(a);
                for (int j: a) {
                    System.out.print(j);
                }
                a.clear();
                fl=true;
            }
            if(f[i]==2) fl=false;
            a.add(f[i]);
        }
    }
}


import java.util.*;
/**
 *
 * @author comp
 */
public class Olimp {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s=in.next();
        int f[]=new int[s.length()];
        for (int i = 0; i < s.length(); i++) {
            f[i]=s.charAt(i)-'0';
        }
        boolean fl=true;
        ArrayList<Integer> a=new ArrayList<>();
        for (int i = 0; i < s.length()+1; i++) {
            if(i==s.length()){
                Collections.sort(a);
                for (int j: a) {
                    System.out.print(j);
                }
                return;
            }
            if(f[i]==0 && fl==false){
                Collections.sort(a);
                for (int j: a) {
                    System.out.print(j);
                }
                a.clear();
            }
            if(f[i]==2) fl=false;
            a.add(f[i]);
        }
    }
}


import java.util.*;
/**
 *
 * @author comp
 */
public class NewClass {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s=in.next();
        int f[]=new int[s.length()];
        int c0=0, c2=0;
        int b[]=new int[3];
        for (int i = 0; i < s.length(); i++) {
            int m=s.charAt(i)-'0';
            f[i]=m;
            b[m]++;
        }
        int b1[]=new int[3];
        ArrayList<Integer> a=new ArrayList<>();
        boolean fl=true;
        for (int i = 0; i < s.length(); i++) {
            if((f[i]==0 || f[i]==2)&& fl==false){
                a.add(f[i]);
                b1[f[i]]++;
            }
            if(f[i]==2) fl=false;
        }
        for (int i = 0; i < 3; i++) {
            b[i]-=b1[i];
        }
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < b[i]; j++) {
                System.out.print(i);
            }
        }
        for(int i:a){
            System.out.print(i);
        }
    }
}


import java.io.*;
import java.util.*;

public class problem47B {

    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new problem47B().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\input.txt"));
            out = new PrintWriter("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    String replace (String s, int i1, int i2, int j1, int j2) {
    	String ans = s.substring(0, i1) + s.substring(j1, j2+1) + s.substring(i2+1, j1) + s.substring(i1, i2+1)
    	+ s.substring(j2+1,s.length());

    	return ans;
    }

    void solve() throws IOException {
    	String sub1="", sub2="";
    	String s = readString();
    	sub1 = "" + s.charAt(0);

    	int i = 1;

    	while (i < s.length() && s.charAt(i) == sub1.charAt(0)) {
    		sub1 += s.charAt(i++);
    	}

    	if (i < s.length()) sub2 = s.charAt(i++)+"";

    	String ans = "";

    	while (i < s.length()) {

    		if (sub2 == "" || s.charAt(i) == sub2.charAt(0)) {
    			sub2 += s.charAt(i);
    		} else if (sub1.charAt(0)+0 == sub2.charAt(0)+1) {
    			ans += sub2;
    			sub2 = s.charAt(i)+"";
    			if (sub1.charAt(0) == sub2.charAt(0)) {
    				sub1 += sub2;
    				if (i < s.length()-1) sub2 = "";
    			}

    		} else {
    			ans += sub1;
    			sub1 = sub2;
    			sub2 = s.charAt(i)+"";
    		}

    		i++;
    	}

    	if (sub1.charAt(0) == sub2.charAt(0)+1) {
    		ans += sub2+sub1;
    	} else {
    		ans += sub1+sub2;
    	}

    	out.println(ans);
    }

//////////Functions //////////

    List<Integer> mkListfa(int[] ar) {

		List<Integer> list = new ArrayList<Integer>();

		for (int i = 0; i < ar.length; i++) {
			list.add(ar[i]);
		}

		return list;
    }

    int min(int... a) {
    	int min = Integer.MAX_VALUE;

    	for (int i = 0; i < a.length; i++) {
    		if (a[i] < min) {
    			min = a[i];
    		}
    	}

    	return min;
    }

}


import java.io.*;
import java.util.*;

public class problem47B {

    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new problem47B().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\input.txt"));
            out = new PrintWriter("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    String replace (String s, int i1, int i2, int j1, int j2) {
    	String ans = s.substring(0, i1) + s.substring(j1, j2+1) + s.substring(i2+1, j1) + s.substring(i1, i2+1)
    	+ s.substring(j2+1,s.length());

    	return ans;
    }

    void solve() throws IOException {
    	String s = readString();
    	int fT = s.length();
    	int ones = 0;
    	String sub = "";
    	for (int i = 0; i < s.length(); i++) {
    		if (fT == s.length() && s.charAt(i) == '0') out.print("0");
    		if (s.charAt(i) == '1') ones++;
    		if (fT == s.length() && s.charAt(i) == '2') fT = i;
    		if (i >= fT && s.charAt(i) != '1') sub += s.charAt(i);
    	}
    	while (ones > 0) {
    		out.print("1");
    		ones--;
    	}
    	out.println(sub);
    }

//////////Functions //////////

    List<Integer> mkListfa(int[] ar) {

		List<Integer> list = new ArrayList<Integer>();

		for (int i = 0; i < ar.length; i++) {
			list.add(ar[i]);
		}

		return list;
    }

    int min(int... a) {
    	int min = Integer.MAX_VALUE;

    	for (int i = 0; i < a.length; i++) {
    		if (a[i] < min) {
    			min = a[i];
    		}
    	}

    	return min;
    }

}


import java.io.*;
import java.util.*;

public class problem47B {

    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new problem47B().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\input.txt"));
            out = new PrintWriter("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    String replace (String s, int i1, int i2, int j1, int j2) {
    	String ans = s.substring(0, i1) + s.substring(j1, j2+1) + s.substring(i2+1, j1) + s.substring(i1, i2+1)
    	+ s.substring(j2+1,s.length());

    	return ans;
    }

    void solve() throws IOException {
    	String s = readString();
    	int left = -1, right = -1;
    	int i1 = 0, i2 = -1, j1 = -1, j2 = -1;
    	left = s.charAt(i1);

    	int n = s.length();
    	for (int i = 0; i < n; i++) {

    		if (s.charAt(i1) != s.charAt(i) && j1 == -1) {
    			j1 = i;
    			j2 = j1-1;
    			right = s.charAt(j1);
    		} else if (j1 == -1 && s.charAt(i1) == s.charAt(i)) {
    			i2++;
    		}

    		if (j1 != -1 && s.charAt(i) != s.charAt(j1)) {
    			if (left == right+1) {
    				s = replace(s, i1, i2, j1, j2);
    				int d = (j2-j1-i2+i1);
    				int dl = i2-i1;
    				i2 = i1+j2-j1;
    				j1 = j1+d;
    				j2 = j1 + dl;
    				int buf;
    				buf = left;
    				left = right;
    				right = buf;
    			}

	    		i1 = j1;
	    		i2 = j2;
	    		j1 = i;
	    		j2 = j1;
	    		left = right;
	    		right = s.charAt(j1);
	    		if (left == right) {
	    			i2 = j2;
	    			j1 = -1;
	    			j2 = -1;
	    		}

    		} else if (j1 != -1 && s.charAt(i) == s.charAt(j1)) {
    			j2++;
    		}

    	}

    	if (left == right+1) {
			s = replace(s, i1, i2, j1, j2);
			int d = (j2-j1-i2+i1);
			int dl = i2-i1;
			i2 = i1+j2-j1;
			j1 = j1+d;
			j2 = j1 + dl;
			int buf;
			buf = left;
			left = buf;
		}

    	out.println(s);
    }

//////////Functions //////////

    List<Integer> mkListfa(int[] ar) {

		List<Integer> list = new ArrayList<Integer>();

		for (int i = 0; i < ar.length; i++) {
			list.add(ar[i]);
		}

		return list;
    }

    int min(int... a) {
    	int min = Integer.MAX_VALUE;

    	for (int i = 0; i < a.length; i++) {
    		if (a[i] < min) {
    			min = a[i];
    		}
    	}

    	return min;
    }

}


import java.io.*;
import java.util.*;

public class problem47B {

    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new problem47B().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\input.txt"));
            out = new PrintWriter("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    String replace (String s, int i1, int i2, int j1, int j2) {
    	String ans = s.substring(0, i1) + s.substring(j1, j2+1) + s.substring(i2+1, j1) + s.substring(i1, i2+1)
    	+ s.substring(j2+1,s.length());

    	return ans;
    }

    void solve() throws IOException {
    	List<Character> list = new ArrayList<Character>();
    	int ones = 0;
    	boolean fT = false;
    	while (in.ready()) {
    		int c = in.read();
    		char a = (char) c;

    		if (!fT && a == '0') out.print(a);
    		if (a == '1') ones++;
    		if (!fT && a == '2') {
    			fT = true;
    			list.add(a);
    		} else if (fT && a != '1') {
    			list.add(a);
    		}
    	}

    	while (ones > 0) {
    		out.print('1');
    		ones--;
    	}

    	for (int i = 0; i < list.size(); i++) {
    		out.print(list.get(i));
    	}
    }

//////////Functions //////////

    List<Integer> mkListfa(int[] ar) {

		List<Integer> list = new ArrayList<Integer>();

		for (int i = 0; i < ar.length; i++) {
			list.add(ar[i]);
		}

		return list;
    }

    int min(int... a) {
    	int min = Integer.MAX_VALUE;

    	for (int i = 0; i < a.length; i++) {
    		if (a[i] < min) {
    			min = a[i];
    		}
    	}

    	return min;
    }

}


import java.io.*;
import java.util.*;

public class problem47B {

    static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;

    public static void main(String[] args) {
        new problem47B().run();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok;

    void init() throws FileNotFoundException {

        if (ONLINE_JUDGE) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\input.txt"));
            out = new PrintWriter("D:\\Java-programs\\eclipse-workspace\\OLYMP\\src\\output.txt");
        }

        tok = new StringTokenizer("");
    }

    void run() {
        try {
            long timeStart = System.currentTimeMillis();

            init();
            solve();

            out.close();

            long timeEnd = System.currentTimeMillis();
            System.err.println("Time = " + (timeEnd - timeStart));
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
    }

    String readLine() throws IOException {
        return in.readLine();
    }

    String delimiter = " ";

    String readString() throws IOException {
        while (!tok.hasMoreTokens()) {
            String nextLine = readLine();
            if (null == nextLine) return null;

            tok = new StringTokenizer(nextLine);
        }

        return tok.nextToken(delimiter);
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    String replace (String s, int i1, int i2, int j1, int j2) {
    	String ans = s.substring(0, i1) + s.substring(j1, j2+1) + s.substring(i2+1, j1) + s.substring(i1, i2+1)
    	+ s.substring(j2+1,s.length());

    	return ans;
    }

    void solve() throws IOException {
    	String sub1="", sub2="";
    	String s = readString();
    	sub1 = "" + s.charAt(0);

    	int i = 1;

    	while (i < s.length() && s.charAt(i) == sub1.charAt(0)) {
    		sub1 += s.charAt(i++);
    	}

    	if (i < s.length()) sub2 = s.charAt(i++)+"";

    	String ans = "";

    	while (i < s.length()) {

    		if (sub2 == "" || s.charAt(i) == sub2.charAt(0)) {
    			sub2 += s.charAt(i);
    		} else if (sub1.charAt(0)+0 == sub2.charAt(0)+1) {
    			out.print(sub2);
    			sub2 = s.charAt(i)+"";
    			if (sub1.charAt(0) == sub2.charAt(0)) {
    				sub1 += sub2;
    				if (i < s.length()-1) sub2 = "";
    			}

    		} else {
    			out.print(sub1);
    			sub1 = sub2;
    			sub2 = s.charAt(i)+"";
    		}

    		i++;
    	}

    	if (sub1.charAt(0) == sub2.charAt(0)+1) {
    		out.print(sub2+sub1);;
    	} else {
    		out.print(sub1+sub2);;
    	}

    	out.println(ans);
    }

//////////Functions //////////

    List<Integer> mkListfa(int[] ar) {

		List<Integer> list = new ArrayList<Integer>();

		for (int i = 0; i < ar.length; i++) {
			list.add(ar[i]);
		}

		return list;
    }

    int min(int... a) {
    	int min = Integer.MAX_VALUE;

    	for (int i = 0; i < a.length; i++) {
    		if (a[i] < min) {
    			min = a[i];
    		}
    	}

    	return min;
    }

}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;
	     int flag1=1;int flag=0;int index=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else {
	    			 fans.append(str.charAt(i));

	    			 if(flag1==1) index++;

	    			 if(str.charAt(i)=='2' && flag1==1)
	    				 {
	    					 flag=1;flag1=0;
	    				 }
	    		 }
	    	 }

	     index--;
	     if(flag==1)
	    	 {
	    		 StringBuilder temp=new StringBuilder("");
	    		 for(int i=0;i<index;i++) temp.append(fans.charAt(i));
	    		 for(int i=0;i<o;i++) temp.append("1");
	    		 for(int i=index;i<fans.toString().length();i++) temp.append(fans.charAt(i));
	    		 fans=temp;
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     out.println(fans);
	     out.close();

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int i=0;

	     for(i=0;i<str.length();i++)
	    	 if(str.charAt(i)=='2') break;

	     int index=i;

	     int z=0; int o=0;

	     for(i=0;i<index;i++) {if(str.charAt(i)=='0')z++; if(str.charAt(i)=='1')o++;}

	     for(int j=0;j<z;j++) fans.append("0");
	     for(int j=0;j<o;j++) fans.append("1");

	     z=0;o=0;int t=0;

	     int flag=0;

	     for(int j=index;j<str.length();j++)
	    	 {
	    		 if(str.charAt(j)=='0') {z++; flag=1;}

	    		 if(str.charAt(j)=='1')o++;
	    		 if(str.charAt(j)=='2')t++;

	    		 if(str.charAt(j)=='2' && flag==1)
	    			 {
	    				 for(int k=0;k<o;k++) fans.append("1");
	    				 for(int k=0;k<t;k++) fans.append("2");
	    				 for(int k=0;k<z;k++) fans.append("0");
	    				 o=0;z=0;t=0;
	    			 }
	    	 }

	     for(int k=0;k<o;k++) fans.append("1");
	     for(int k=0;k<t;k++) fans.append("2");
		 for(int k=0;k<z;k++) fans.append("0");
		 o=0;z=0;

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else fans.append(str.charAt(i));
	    	 }

	     int flag=0;int index=0;
	     for(int i=0;i<fans.toString().length();i++) if(fans.charAt(i)=='2') {index=i;flag=1;break;}

	     if(flag==1)
	    	 {
	    		 StringBuilder temp=new StringBuilder("");
	    		 for(int i=0;i<o;i++) temp.append("1");
	    		 fans.insert(index, temp);
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else fans.append(str.charAt(i));
	    	 }

	     int flag=0;int index=0;
	     for(int i=0;i<fans.toString().length();i++) if(fans.charAt(i)=='2') {index=i;flag=1;break;}

	     if(flag==1)
	    	 {
	    		 StringBuilder temp=new StringBuilder("");
	    		 for(int i=0;i<index;i++) temp.append(fans.charAt(i));
	    		 for(int i=0;i<o;i++) temp.append("1");
	    		 for(int i=index;i<fans.toString().length();i++) temp.append(fans.charAt(i));
	    		 fans=temp;
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();
	     int n = str.length();
			int c0 = 0;
			int c1 = 0;
			int c2 = 0;
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				if (str.charAt(i) == '1') c1++;
				else if (str.charAt(i) == '2') {
					a[c2] = 2;
					c2++;
				} else {
					if (c2 == 0) c0++;
					else {
						a[c2] = 0;
						c2++;
					}
				}
			}
			for (int i = 0; i < c0; i++) out.print('0');
			for (int i = 0; i < c1; i++) out.print('1');
			for (int i = 0; i < c2; i++) out.print(a[i] == 0 ? '0' : '2');
			out.println();
			out.close();
   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;
	     int flag1=1;int flag=0;int index=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else {
	    			 fans.append(str.charAt(i));

	    			 if(flag1==1) index++;

	    			 if(str.charAt(i)=='2' && flag1==1)
	    				 {
	    					 flag=1;flag1=0;
	    				 }
	    		 }
	    	 }

	     index--;
	     if(flag==1)
	    	 {
	    		 StringBuilder temp=new StringBuilder("");
	    		 for(int i=0;i<index;i++) temp.append(fans.charAt(i));
	    		 for(int i=0;i<o;i++) temp.append("1");
	    		 for(int i=index;i<fans.toString().length();i++) temp.append(fans.charAt(i));
	    		 fans=temp;
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int i=0;

	     for(i=0;i<str.length();i++)
	    	 if(str.charAt(i)=='2') break;

	     int index=i;

	     int z=0; int o=0;

	     for(i=0;i<index;i++) {if(str.charAt(i)=='0')z++; if(str.charAt(i)=='1')o++;}

	     for(int j=0;j<z;j++) fans.append("0");
	     for(int j=0;j<o;j++) fans.append("1");

	     z=0;o=0;int t=0;

	     int flag=0;

	     for(int j=index;j<str.length();j++)
	    	 {
	    		 if(str.charAt(j)=='0') {z++; flag=1;}

	    		 if(str.charAt(j)=='1')o++;

	    		 if(str.charAt(j)=='2' && flag==1)
	    			 {
	    				 for(int k=0;k<o;k++) fans.append("1");
	    				 for(int k=0;k<t;k++) fans.append("2");
	    				 for(int k=0;k<z;k++) fans.append("0");
	    				 o=0;z=0;t=1;
	    				 flag=0;
	    			 }
	    		 else if(str.charAt(j)=='2')t++;
	    	 }

	     for(int k=0;k<o;k++) fans.append("1");
	     for(int k=0;k<t;k++) fans.append("2");
		 for(int k=0;k<z;k++) fans.append("0");
		 o=0;z=0;

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else fans.append(str.charAt(i));
	    	 }

	     int flag=0;int index=0;
	     for(int i=0;i<fans.toString().length();i++) if(fans.charAt(i)=='2') {index=i;flag=1;break;}

	     if(flag==1)
	    	 {
	    		 for(int i=0;i<o;i++) fans.insert(index, '1');
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.io.*;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.net.ssl.SSLContext;

public class Main
{
   static long mod=(long)(1e+9) + 7;
   static int[] sieve;
   static ArrayList<Integer> primes;
   static int freq[];
   static int block_size;
   static int ans=0;

   public static void main(String[] args) throws java.lang.Exception
   {
	     fast s = new fast();
	     PrintWriter out=new PrintWriter(System.out);
	     Scanner sc=new Scanner(System.in);
	     StringBuilder fans = new StringBuilder();

	     String str=s.nextLine();

	     int o=0;

	     for(int i=0;i<str.length();i++)
	    	 {
	    		 if(str.charAt(i)=='1') o++;
	    		 else fans.append(str.charAt(i));
	    	 }

	     int flag=0;int index=0;
	     for(int i=0;i<fans.toString().length();i++) if(fans.charAt(i)=='2') {index=i;flag=1;break;}

	     if(flag==1)
	    	 {
	    		 StringBuilder temp=new StringBuilder("");
	    		 for(int i=0;i<index;i++) temp.append(fans.charAt(i));
	    		 for(int i=0;i<o;i++) temp.append("1");
	    		 for(int i=index;i<fans.toString().length();i++) temp.append(str.charAt(i));
	    		 fans=temp;
	    	 }
	     else
	    	 for(int i=0;i<o;i++) fans.append("1");

	     System.out.println(fans);

   }

static class fast {
		private InputStream i;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public static boolean next_permutation(int a[])
		   {
			   int i=0,j=0;int index=-1;
			   int n=a.length;

			   for(i=0;i<n-1;i++)
				   if(a[i]<a[i+1]) index=i;

			   if(index==-1) return false;
			   i=index;

			   for(j=i+1;j<n && a[i]<a[j];j++);

			   int temp=a[i];
			   a[i]=a[j-1];
			   a[j-1]=temp;

			   for(int p=i+1,q=n-1;p<q;p++,q--)
			   {
				   temp=a[p];
				   a[p]=a[q];
				   a[q]=temp;
			   }

			   return true;
		   }

		public static void division(char ch[],int divisor)
		   {
			   int div=Character.getNumericValue(ch[0]); int mul=10;int remainder=0;
			   StringBuilder quotient=new StringBuilder("");
			   for(int i=1;i<ch.length;i++)
			   {
				   div=div*mul+Character.getNumericValue(ch[i]);
				   if(div<divisor) {quotient.append("0");continue;}
				   quotient.append(div/divisor);
				   div=div%divisor;mul=10;

			   }
			   remainder=div;
			   while(quotient.charAt(0)=='0')quotient.deleteCharAt(0);
			   System.out.println(quotient+" "+remainder);
		   }

		public static void sieve(int size)
		{
			sieve=new int[size+1];
			primes=new ArrayList<Integer>();
			sieve[1]=1;
			for(int i=2;i<=Math.sqrt(size);i++)
			{
				if(sieve[i]==0)
				 {
					for(int j=i*i;j<size;j+=i) sieve[j]=1;
				 }
			}

			for(int i=2;i<=size;i++)
			{
				if(sieve[i]==0) primes.add(i);
			}
		}
		public static long pow(long n, long b, long MOD)
		   {
		       long x=1;long y=n;
		       while(b > 0)
		       {
		           if(b%2 == 1)
		           {
		               x=x*y;
		               if(x>MOD) x=x%(MOD);
		           }
		           y = y*y;
		           if(y>MOD) y=y%(MOD);
		           b >>= 1;
		       }
		       return x;
		   }

		 public static int upper(Integer[] a,int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]<key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]>=key && (((mid-1)>=0 && a[mid-1]<key) || (mid-1)==0)) return mid;
			   else if(a[mid]== key && (mid-1)>=0 && a[mid-1]==key) return lower(a,start,mid-1,key);
			   else if(key>a[mid]) return lower(a,mid+1,end,key);
			   else return lower(a,start,mid-1,key);
		}

		 public static int lower(Integer a[],int start,int end,int key)
		 {
			   int mid=(start+end)>>1;
			   if(start==end && a[mid]>key) {return -1;}
			   if(start>end) return -1;

			   if(a[mid]<=key && (((mid+1)<a.length && a[mid+1]>key) || (mid+1)==a.length)) return mid;
			   else if(a[mid]== key && (mid+1)<a.length && a[mid+1]==key) return upper(a,mid+1,end,key);
			   else if(key>=a[mid]) return upper(a,mid+1,end,key);
			   else return upper(a,start,mid-1,key);
		}

		public int gcd(int a,int b)
		{
			if(a==0) return b;
			return gcd(b%a,a);
		}
		public fast() {
			this(System.in);
		}
		public fast(InputStream is) {
			i = is;
		}
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = i.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}
		public String nextString() {
     		int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
		public boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
		public boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

	}
}


import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Tester {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		String st=s.nextLine();
		int a[]=new int[3];
		String tmp="";
		String ans="";
		for(int j=0;j<st.length();j++)
		{
			a[Integer.parseInt((st.charAt(j)+""))]++;
			if(!tmp.equals("") && st.charAt(j)=='0')
			{
				tmp+="0";
				a[0]--;
			}
			else if(st.charAt(j)=='2')
			{
				tmp+="2";
				a[2]--;
			}
		}
		for(int j=1;j<=a[0];j++)
			ans+="0";
		for(int j=1;j<=a[1];j++)
			ans+="1";
		ans+=tmp;
		System.out.println(ans);

	}

}