//package smallnum;

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];
		StringBuilder tmp=new StringBuilder("");
		StringBuilder ans=new StringBuilder("");
		for(int j=0;j<st.length();j++)
		{
			a[Integer.parseInt((st.charAt(j)+""))]++;
			if(tmp.length()!=0&& st.charAt(j)=='0')
			{
				tmp.append("0");
				a[0]--;
			}
			else if(st.charAt(j)=='2')
			{
				tmp.append("2");
				a[2]--;
			}
		}
		//System.out.println(tmp);
		//System.out.println(ans);
		for(int j=1;j<=a[0];j++)
			ans=ans.append("0");
		//System.out.println(ans);
		for(int j=1;j<=a[1];j++)
			ans=ans.append("1");
		ans=ans.append(tmp);
		System.out.println(ans);

	}

}


//package smallnum;

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];
		StringBuilder tmp=new StringBuilder("");
		StringBuilder ans=new StringBuilder("");
		for(int j=0;j<st.length();j++)
		{
			a[Integer.parseInt((st.charAt(j)+""))]++;
			if(!tmp.equals("") && st.charAt(j)=='0')
			{
				tmp.append("0");
				a[0]--;
			}
			else if(st.charAt(j)=='2')
			{
				tmp.append("2");
				a[2]--;
			}
		}
		for(int j=1;j<=a[0];j++)
			ans.append("0");
		for(int j=1;j<=a[1];j++)
			ans.append("1");
		ans.append(tmp);
		System.out.println(ans);

	}

}


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

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/7/9 15:33
 * @see format
 */
public class B {

    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();

        if (s.length() <= 1) {
            pw.print(s);
            return;
        }
        char ch[] = s.toCharArray();
        if (s.indexOf('2') == -1 || s.indexOf('0') == -1) {
            Arrays.sort(ch);
            pw.print(String.valueOf(ch));
            return;
        }
        if (s.indexOf('1') == -1) {
            pw.print(s);
            return;
        }

        StringBuilder sb = new StringBuilder();

        int insert0 = 0;
        int insert1 = -1;
        int insert2 = -1;
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] == '0') {
                if (insert2 != -1) {
                    int k = i - sb.length();
                    for (int j = 0; j < k; j++) {
                        sb.insert(insert1++, '1');
                    }
                    insert2 = -1;
                }
                sb.append('0');
            } else if (ch[i] == '2') {
                if (insert2 == -1) {
                    insert1 = sb.length();
                }
                insert2 = i;
                sb.append('2');
            }
        }
        int k = s.length() - sb.length();
        for (int j = 0; j < k; j++) {
            sb.insert(insert1++, '1');
        }

        pw.print(sb.toString());
    }

    public static void main(String args[]) throws IOException {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if (!oj) {
            System.setIn(new FileInputStream("in.txt"));
//            System.setOut(new PrintStream("out.txt"));
        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
        if (!oj) {
            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
        }
        pw.flush();
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}


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

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/7/9 15:33
 * @see format
 */
public class B {

    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();

        if (s.length() <= 1) {
            pw.print(s);
            return;
        }
        char ch[] = s.toCharArray();
        if (s.indexOf('2') == -1 || s.indexOf('0') == -1) {
            Arrays.sort(ch);
            pw.print(String.valueOf(ch));
            return;
        }
        if (s.indexOf('1') == -1) {
            pw.print(s);
            return;
        }

        StringBuilder sb = new StringBuilder();

        int insert1 = -1;
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] == '0') {
                sb.append('0');
            } else if (ch[i] == '2') {
                if (insert1 == -1) {
                    insert1 = sb.length();
                }
                sb.append('2');
            }
        }
        int k = s.length() - sb.length();
        for (int j = 0; j < k; j++) {
            sb.insert(insert1++, '1');
        }

        pw.print(sb.toString());
    }

    public static void main(String args[]) throws IOException {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if (!oj) {
            System.setIn(new FileInputStream("in.txt"));
//            System.setOut(new PrintStream("out.txt"));
        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
        if (!oj) {
            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
        }
        pw.flush();
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}


import java.io.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/7/9 15:33
 * @see format
 */
public class B {

    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();

        if (s.length() <= 1) {
            pw.print(s);
            return;
        }

        char ch[] = s.toCharArray();
        int pre = -1;
        boolean flag = false;
        int tmp = -1;
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] == '0') {
                if (pre == -1) {
                    flag = false;
                    continue;
                } else if (!flag) {
                    ch[pre] = '0';
                    ch[i] = '1';
                    pre++;
                }
            } else if (ch[i] == '1') {
                if (flag) {
                    ch[tmp] = '1';
                    ch[i] = '2';
                    tmp++;
                    pre = -1;
                } else if (pre == -1) {
                    pre = i;
                }
            } else {
                flag = true;
                if (tmp == -1) {
                    tmp = i;
                }
            }
        }
        pw.print(String.valueOf(ch));
    }

    public static void main(String args[]) throws IOException {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if (!oj) {
            System.setIn(new FileInputStream("in.txt"));
//            System.setOut(new PrintStream("out.txt"));
        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
        if (!oj) {
            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
        }
        pw.flush();
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}


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

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/7/9 15:33
 * @see format
 */
public class B {

    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        String s = nextLine();

        if (s.length() <= 1) {
            pw.print(s);
            return;
        }
        char ch[] = s.toCharArray();
        if (s.indexOf('2') == -1 || s.indexOf('0') == -1) {
            Arrays.sort(ch);
            pw.print(String.valueOf(ch));
            return;
        }
        if (s.indexOf('1') == -1) {
            pw.print(s);
            return;
        }

        StringBuilder sb = new StringBuilder();

        int insert0 = 0;
        int insert1 = -1;
        int insert2 = -1;
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] == '0') {
                if (insert2 != -1) {
                    int k = i - sb.length();
                    for (int j = 0; j < k; j++) {
                        sb.insert(insert1++, '1');
                    }
                    insert1 = -1;
                    insert2 = -1;
                }
                sb.append('0');
            } else if (ch[i] == '2') {
                if (insert1 == -1) {
                    insert1 = sb.length();
                }
                insert2 = i;
                sb.append('2');
            }
        }
        int k = s.length() - sb.length();
        for (int j = 0; j < k; j++) {
            sb.insert(insert1++, '1');
        }

        pw.print(sb.toString());
    }

    public static void main(String args[]) throws IOException {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if (!oj) {
            System.setIn(new FileInputStream("in.txt"));
//            System.setOut(new PrintStream("out.txt"));
        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
        if (!oj) {
            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
        }
        pw.flush();
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}


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

/**
 * Copyright © 2018 Chris. All rights reserved.
 *
 * @author Chris
 * 2018/7/9 15:33
 * @see format
 */
public class B {

    private static BufferedReader br;
    private static StreamTokenizer st;
    private static PrintWriter pw;

    private static void solve() throws IOException {
        char ch[] = nextLine().toCharArray();

        int rear = ch.length - 1;
        while (rear >= 0 && ch[rear] == '0') {
            rear--;
        }
        Arrays.sort(ch, 0 ,rear + 1);
        pw.print(String.valueOf(ch));

    }

    public static void main(String args[]) throws IOException {
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        if (!oj) {
            System.setIn(new FileInputStream("in.txt"));
//            System.setOut(new PrintStream("out.txt"));
        }
        br = new BufferedReader(new InputStreamReader(System.in));
        st = new StreamTokenizer(br);
        pw = new PrintWriter(new OutputStreamWriter(System.out));
        st.ordinaryChar('\''); //指定单引号、双引号和注释符号是普通字符
        st.ordinaryChar('\"');
        st.ordinaryChar('/');

        long t = System.currentTimeMillis();
        solve();
        if (!oj) {
            pw.println("[" + (System.currentTimeMillis() - t) + "ms]");
        }
        pw.flush();
    }

    private static int nextInt() throws IOException {
        st.nextToken();
        return (int) st.nval;
    }

    private static long nextLong() throws IOException {
        st.nextToken();
        return (long) st.nval;
    }

    private static double nextDouble() throws IOException {
        st.nextToken();
        return st.nval;
    }

    private static String[] nextSS(String reg) throws IOException {
        return br.readLine().split(reg);
    }

    private static String nextLine() throws IOException {
        return br.readLine();
    }
}


import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean f= true;
        char arr[] = str.toCharArray();
        StringBuilder sb = new StringBuilder();
        int cnt=0; int cnt1=0; boolean flag = false;
        int id = -1;
        for(int i=0;i<arr.length;i++){
            if(arr[i]=='1') cnt++;
            if(arr[i]=='0' && !flag) cnt1++;
            if(arr[i]=='2' && !flag) { flag = true; id=i;}
        }
        for(int i=0;i<cnt1;i++) sb.append('0');
        for(int i=0;i<cnt;i++) sb.append('1');
        if(id!=-1){
            for(int i=id;i<arr.length;i++) if(arr[i]=='2' || arr[i]=='0') sb.append(arr[i]);
        }
        System.out.println(sb+"");

    }}


import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean f= true;
        char arr[] = str.toCharArray();
        while(f){
            f= false;
        for(int i=0;i<arr.length-1;i++){
            if(i>0 && arr[i]=='0' && arr[i-1]=='2' && arr[i+1] == '1')
            {
                arr[i] = '1';
                arr[i+1] = '0';
                f= true;
                continue;
            }
            if(arr[i]=='1' && arr[i+1]=='0'){
                arr[i] = '0';
                arr[i+1] = '1';
                f = true;
            }
            if(arr[i] == '2' && arr[i+1] == '1'){
                arr[i]='1';
                f=true;
                arr[i+1]='2';
            }
        }
        }
        str = new String(arr);
        System.out.println(str);

    }}


import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean f= true;
        char arr[] = str.toCharArray();
        while(f){
            f= false;
        for(int i=0;i<arr.length-1;i++){
            if(arr[i]=='1' && arr[i+1]=='0'){
                arr[i] = '0';
                arr[i+1] = '1';
                f = true;
            }
            if(arr[i] == '2' && arr[i+1] == '1'){
                arr[i]='1';
                f=true;
                arr[i+1]='2';
            }
        }
        }
        str = new String(arr);
        System.out.println(str);

    }}


import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        boolean f= true;
        char arr[] = str.toCharArray();
        while(f){
            f= false;
        for(int i=0;i<arr.length-1;i++){
            if(i>0 && arr[i]=='0' && arr[i-1]=='2' && arr[i+1] == '1')
            {
                arr[i] = '1';
                arr[i+1] = '0';
                f= true;
                break;
            }
            if(arr[i]=='1' && arr[i+1]=='0'){
                arr[i] = '0';
                arr[i+1] = '1';
                f = true;
                break;
            }
            if(arr[i] == '2' && arr[i+1] == '1'){
                arr[i]='1';
                f=true;
                arr[i+1]='2';
                break;
            }
        }
        }
        str = new String(arr);
        System.out.println(str);

    }}


import com.sun.org.apache.xpath.internal.SourceTree;

import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ones="";
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones+="n";
                //flag=true;
            }
            else if(s.charAt(i)=='2' && two_mark==len){
                two_mark=i;
            }
            //else if(s.charAt(i)=='0' && zero_mark==-1)
        }
        //System.out.println(two_mark+" & "+ones);
        String st=(s.substring(0,two_mark).replaceAll("1","")+ones+(s.substring(two_mark,len).replaceAll("1","")));
        //System.out.println(st.length());
        //String stt= st.replaceAll("1","");
        String stt =st.replaceAll("n","1");
        System.out.println(stt);
    }
}


import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ones="";
        ArrayList<Character> a = new ArrayList();
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones+="n";
                //flag=true;
            }
            else {
                    a.add(s.charAt(i));
                    if(s.charAt(i)=='2' && two_mark==len){
                        two_mark=i;
                    }
            }
        }
        //System.out.println(two_mark);
        StringBuilder st = new StringBuilder();
        int count=0;
        for(int j = 0;j<a.size();j++) {
            if(a.get(j)=='2' && count==0){
          //      System.out.println(j);
                count++;
                for (int i = 0; i < ones.length(); i++) {
                    st.append('1');
                }
            }
            st.append(a.get(j));
        }
        if(two_mark==len){
            for (int i = 0; i < ones.length(); i++) {
                st.append('1');
            }
        }
        System.out.println(st);
    }
}


import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ones="";
        ArrayList<Character> a = new ArrayList();
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones+="n";
                //flag=true;
            }
            else {
                    a.add(s.charAt(i));
                    if(s.charAt(i)=='2' && two_mark==len){
                        two_mark=i;
                    }
            }
        }
        //System.out.println(two_mark);
        StringBuilder st = new StringBuilder();
        for(int j = 0;j<a.size();j++) {
            if(a.get(j)=='2'){
          //      System.out.println(j);
                for (int i = 0; i < ones.length(); i++) {
                    st.append('1');
                }
            }
            st.append(a.get(j));
        }
        if(two_mark==len){
            for (int i = 0; i < ones.length(); i++) {
                st.append('1');
            }
        }
        System.out.println(st);
    }
}


import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(); int ones=0;
        ArrayList<Character> a = new ArrayList();
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones++;
                //flag=true;
            }
            else {
                    a.add(s.charAt(i));
                    if(s.charAt(i)=='2' && two_mark==len){
                        two_mark=i;
                    }
            }
        }
        //System.out.println(two_mark);
        StringBuilder st = new StringBuilder();
        int count=0;
        for(int j = 0;j<a.size();j++) {
            if(a.get(j)=='2' && count==0){
          //      System.out.println(j);
                count++;
                for (int i = 0; i < ones; i++) {
                    st.append('1');
                }
            }
            st.append(a.get(j));
        }
        if(two_mark==len){
            for (int i = 0; i < ones; i++) {
                st.append('1');
            }
        }
        System.out.println(st);
    }
}


import com.sun.org.apache.xpath.internal.SourceTree;

import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ones="";
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones+="n";
                //flag=true;
            }
            else if(s.charAt(i)=='2' && two_mark==len){
                two_mark=i;
            }
            //else if(s.charAt(i)=='0' && zero_mark==-1)
        }
        //System.out.println(two_mark+" & "+ones);
        String st=(s.substring(0,two_mark)+ones+s.substring(two_mark,len));
        String stt= st.replaceAll("1","");
        String sttt =stt.replaceAll("n","1");
        System.out.println(sttt);
    }
}


import com.sun.org.apache.xpath.internal.SourceTree;

import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ones="";
        int len = s.length(); int two_mark=len-1; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones+="n";
                //flag=true;
            }
            else if(s.charAt(i)=='2' && two_mark==len-1){
                two_mark=i;
            }
            //else if(s.charAt(i)=='0' && zero_mark==-1)
        }
        //System.out.println(two_mark+" & "+ones);
        String st=(s.substring(0,two_mark)+ones+s.substring(two_mark,len));
        String stt= st.replaceAll("1","");
        String sttt =stt.replaceAll("n","1");
        System.out.println(sttt);
    }
}


import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
    static long m = 1000000007;

    static long powmod(long x, long y, long p) {
        // Initialize result
        long res = 1;

        // Update x if it is more
        // than or equal to p
        x = x % p;

        while (y > 0) {
            // If y is odd, multiply x
            // with result
            if ((y & 1) == 1)
                res = (res * x) % p;

            // y must be even now
            // y = y / 2
            y = y >> 1;
            x = (x * x) % p;
        }
        return res;
    }

    static long mulmod(long a, long b, long mod) {
        long res = 0;
        a = a % mod;
        while (b > 0) {
            // If b is odd, add 'a' to result
            if (b % 2 == 1)
                res = (res + a) % mod;

            // Multiply 'a' with 2
            a = (a * 2) % mod;

            // Divide b by 2
            b /= 2;
        }

        // Return result
        return res % mod;
    }

    public static void main(String args[]) throws Exception {
        Scanner in = new Scanner(System.in);
        String s = in.next(); int ones=0;
        ArrayList<Character> a = new ArrayList();
        int len = s.length(); int two_mark=len; //zero_mark=len-1; boolean flag =false;
        for(int i=0;i<len;i++){
            if(s.charAt(i)==('1')){
                ones++;
                //flag=true;
            }
            else {
                    a.add(s.charAt(i));
            }
        }
        //System.out.println(two_mark);
        StringBuilder st = new StringBuilder();
        int count=0;
        for(int j = 0;j<a.size();j++) {
            if(a.get(j)=='2' && count==0){
          //      System.out.println(j);
                count++;
                for (int i = 0; i < ones; i++) {
                    st.append('1');
                }
            }
            st.append(a.get(j));
        }
        if(two_mark==len){
            for (int i = 0; i < ones; i++) {
                st.append('1');
            }
        }
        System.out.println(st);
    }
}


import java.util.ArrayList;
import java.util.Scanner;

public class MinTernaryString {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr = str.toCharArray();

        int one =0;
        ArrayList<Character> ans = new ArrayList<>();

        for(int i=arr.length-1;i>=0;i--){
            if(arr[i]=='1')
                one++;
            else if(arr[i] == '0')
                ans.add('0');
            else{
                ans.add('2');
            }
        }

        ArrayList<Character> fina = new ArrayList<>();

        boolean flag = false;

        for(int i=ans.size()-1;i>=0;i--){
            if(one==0)
                flag=true;
            if(!flag){
                for(int j=ans.size()-1;j>=0;j--){
                    if(ans.get(j)=='0') {
                        fina.add('0');
                        i--;
                    }
                    else
                        break;
                }

                for(int j=0;j<one;j++){
                    fina.add('1');
                }
                flag = true;
//                continue;
            }
            if(i>=0)
            fina.add(ans.get(i));

        }
       if(!flag){
           for(int j=0;j<one;j++){
               fina.add('1');
           }
       }

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

    }
}


import java.util.ArrayList;
import java.util.Scanner;

public class MinTernaryString {

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr = str.toCharArray();

        int one =0;
        ArrayList<Character> ans = new ArrayList<>();

        for(int i=arr.length-1;i>=0;i--){
            if(arr[i]=='1')
                one++;
            else if(arr[i] == '0')
                ans.add('0');
            else{
                ans.add('2');
            }
        }

        ArrayList<Character> fina = new ArrayList<>();

        boolean flag = false;

        for(int i=ans.size()-1;i>=0;i--){
            if(one==0)
                flag=true;
            if(!flag){
                for(int j=ans.size()-1;j>=0;j--){
                    if(ans.get(j)=='0') {
                        fina.add('0');
                        i--;
                    }
                    else
                        break;
                }

                for(int j=0;j<one;j++){
                    fina.add('1');
                }
                flag = true;
            }

            fina.add(ans.get(i));

        }

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

    }
}


import java.util.Scanner;

public class MinTernaryString {

    public static void solution(char[] arr,int index){
        if(index==arr.length-1)
            return ;
        while(arr[index]-arr[index+1] == 1){
            char temp = arr[index];
            arr[index] = arr[index+1];
            arr[index+1] = temp;
            solution(arr,index+1);
        }
        if(arr[index]-arr[index+1]==0 || arr[index+1]-arr[index]==2){
            solution(arr,index+1);
            while(arr[index]-arr[index+1] == 1){
                char temp = arr[index];
                arr[index] = arr[index+1];
                arr[index+1] = temp;
                solution(arr,index+1);
            }
        }

        if(arr[index]-arr[index+1] == -2 || arr[index]-arr[index+1] == -1){
            solution(arr,index+1);
            while(arr[index]-arr[index+1] == 1){
                char temp = arr[index];
                arr[index] = arr[index+1];
                arr[index+1] = temp;
                solution(arr,index+1);
            }
        }

    }

    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String str = s.next();
        char[] arr = str.toCharArray();

        solution(arr,0);

        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]);
        }

    }
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

import javax.rmi.ssl.SslRMIClientSocketFactory;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int n, m, k;
	static long mod = 1000000007;
	static Boolean[][][] memo;
	static String s;
	static HashSet<Integer> nodes;
	static ArrayList<Integer>[] ad;
	static boolean[] vis, taken;
	static int[] a;
	static TreeSet<Long> al;
	static long[] val;
	static ArrayList<String> aa;
	static char[] b;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		int n = s.length();
		sb = new StringBuilder();
		int o = 0;
		int z = 0;
		int bi = -1;
		for (int i = 0; i < n; i++) {
			if (s.charAt(i) == '2') {
	//			System.out.println(bi+" "+i+" "+z);
				if (bi != -1) {
					while (z-- > 0)
						sb.append(0);
				z++;
				}
				sb.append(2);
				if (bi == -1) {
					bi = z;
					z = 0;
				}
				continue;
			}
			if (s.charAt(i) == '1')
				o++;
			else
				z++;
		}
		if(bi==-1) {
			bi=z;
			z=0;
		}
		while (z-- > 0)
			sb.append(0);
		while (bi-- > 0)
			out.print(0);
		while (o-- > 0)
			out.print(1);
		out.println(sb);
		out.flush();
	}

	static boolean dp(int i, int mask, int flag) {
		if (i == s.length()) {
			if (mask == 0)
				return true;
			return false;
		}
		if (memo[i][mask][flag] != null)
			return memo[i][mask][flag];
		boolean ans = false;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			}
		}
		return memo[i][mask][flag] = ans;
	}

	static void trace(int i, int mask, int flag) {
		if (i == s.length()) {
			return;
		}
		int di = 0;
		int mas = 0;
		int fi = 0;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			}
		}
		sb.append(di);
		trace(i + 1, mas, fi);
		return;
	}

	static class pair implements Comparable<pair> {
		int to;
		long number;

		pair(int t, long n) {
			number = n;
			to = t;
		}

		public String toString() {
			return to + " " + number;
		}

		@Override
		public int compareTo(pair o) {
			return Long.compare(number, o.number);
		}

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

import javax.rmi.ssl.SslRMIClientSocketFactory;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int n, m, k;
	static long mod = 1000000007;
	static Boolean[][][] memo;
	static String s;
	static HashSet<Integer> nodes;
	static ArrayList<Integer>[] ad;
	static boolean[] vis, taken;
	static int[] a;
	static TreeSet<Long> al;
	static long[] val;
	static ArrayList<String> aa;
	static char[] b;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.next();
		int n = s.length();
		sb = new StringBuilder();
		int o = 0;
		int z = 0;
		int bi = -1;
		for (int i = 0; i < n; i++) {
			if (s.charAt(i) == '2') {
				if (bi != -1)
					while (z-- > 0)
						sb.append(0);
				sb.append(2);
				if (bi == -1) {
					bi = z;
				  z=0;
				}
				continue;
			}
			if(s.charAt(i)=='1')
			o++;
			else
				z++;

		}
		while (z-- > 0)
			sb.append(0);
		while(bi-->0)
			out.print(0);
		while(o-->0)
			out.print(1);
		out.println(sb);
		out.flush();
	}

	static boolean dp(int i, int mask, int flag) {
		if (i == s.length()) {
			if (mask == 0)
				return true;
			return false;
		}
		if (memo[i][mask][flag] != null)
			return memo[i][mask][flag];
		boolean ans = false;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			}
		}
		return memo[i][mask][flag] = ans;
	}

	static void trace(int i, int mask, int flag) {
		if (i == s.length()) {
			return;
		}
		int di = 0;
		int mas = 0;
		int fi = 0;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			}
		}
		sb.append(di);
		trace(i + 1, mas, fi);
		return;
	}

	static class pair implements Comparable<pair> {
		int to;
		long number;

		pair(int t, long n) {
			number = n;
			to = t;
		}

		public String toString() {
			return to + " " + number;
		}

		@Override
		public int compareTo(pair o) {
			return Long.compare(number, o.number);
		}

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import java.io.*;
import java.math.BigInteger;
import java.util.*;

import javax.rmi.ssl.SslRMIClientSocketFactory;

public class tr1 {
	static PrintWriter out;
	static StringBuilder sb;
	static int n, m, k;
	static long mod = 1000000007;
	static Boolean[][][] memo;
	static String s;
	static HashSet<Integer> nodes;
	static ArrayList<Integer>[] ad;
	static boolean[] vis, taken;
	static int[] a;
	static TreeSet<Long> al;
	static long[] val;
	static ArrayList<String> aa;
	static char[] b;

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		out = new PrintWriter(System.out);
		String s = sc.nextLine();
		int n = s.length();
		sb = new StringBuilder();
		int o = 0;
		int z = 0;
		int bi = -1;
		for (int i = 0; i < n; i++) {
			if (s.charAt(i) == '2') {
				if (bi != -1)
					while (z-- > 0)
						sb.append(0);
				sb.append(2);
				if (bi == -1) {
					bi = z;
					z = 0;
				}
				continue;
			}
			if (s.charAt(i) == '1')
				o++;
			else
				z++;
		}
		if(bi==-1) {
			bi=z;
			z=0;
		}
		while (z-- > 0)
			sb.append(0);
		while (bi-- > 0)
			out.print(0);
		while (o-- > 0)
			out.print(1);
		out.println(sb);
		out.flush();
	}

	static boolean dp(int i, int mask, int flag) {
		if (i == s.length()) {
			if (mask == 0)
				return true;
			return false;
		}
		if (memo[i][mask][flag] != null)
			return memo[i][mask][flag];
		boolean ans = false;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					ans |= dp(i + 1, mask ^ (1 << d), 1);
					break;
				}
				ans |= dp(i + 1, mask ^ (1 << d), 0);
			}
		}
		return memo[i][mask][flag] = ans;
	}

	static void trace(int i, int mask, int flag) {
		if (i == s.length()) {
			return;
		}
		int di = 0;
		int mas = 0;
		int fi = 0;
		for (int d = 0; d <= 9; d++) {
			if (i == 0) {
				if (d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			} else {
				if (flag == 1 && d == s.charAt(i) - '0') {
					if (dp(i + 1, mask ^ (1 << d), 1)) {
						di = d;
						mas = mask ^ (1 << d);
						fi = 1;
					}
					break;
				}
				if (dp(i + 1, mask ^ (1 << d), 0)) {
					di = d;
					mas = mask ^ (1 << d);
					fi = 0;
				}
			}
		}
		sb.append(di);
		trace(i + 1, mas, fi);
		return;
	}

	static class pair implements Comparable<pair> {
		int to;
		long number;

		pair(int t, long n) {
			number = n;
			to = t;
		}

		public String toString() {
			return to + " " + number;
		}

		@Override
		public int compareTo(pair o) {
			return Long.compare(number, o.number);
		}

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextArrInt(int n) throws IOException {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		public long[] nextArrLong(int n) throws IOException {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}


import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

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

public class TaskB implements Runnable {
    boolean prime[] = new boolean[100001];
    void sieveOfEratosthenes(int n) {
        for (int i = 0; i < n; i++)
            prime[i] = true;
        for (int p = 2; p * p <= n; p++) {
            if (prime[p] == true) {
                for (int i = p * p; i <= n; i += p)
                    prime[i] = false;
            }
        }
    }
    InputReader c;
    PrintWriter w;
    public void run() {
        c = new InputReader(System.in);
        w = new PrintWriter(System.out);
        char s[] = c.next().toCharArray();
        int n = s.length;
        ArrayList<Character> withoutzero = new ArrayList<>();
        int ones = 0;
        for(int i=0;i<n;i++)
            if(s[i]=='1') ones++;
            else withoutzero.add(s[i]);
        ArrayList<Character> ans = new ArrayList<>();
        for(int i=0;i<withoutzero.size();i++){
            if(withoutzero.get(i)=='0') ans.add('0');
            else{
                for(int j=0;j<ones;j++) ans.add('1');
                ans.add('2');
                ones = 0;
            }
        }
        if(ans.size()==0) for(int i=0;i<ones;i++) w.print('1');
        else {
            for(int i=0;i<ans.size();i++) w.print(ans.get(i));
            if(ans.size()!=n) for(int i=0;i<ones;i++) w.print('1');
        }
        w.println();
        w.close();
    }

    public static void sortbyColumn(int arr[][], int col){
        Arrays.sort(arr, new Comparator<int[]>()
        {
            public int compare(int[] o1, int[] o2){
                return(Integer.valueOf(o1[col]).compareTo(o2[col]));
            }
        });

    }
    static long gcd(long a, long b){
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    public static class DJSet {
        public int[] upper;

        public DJSet(int n) {
            upper = new int[n];
            Arrays.fill(upper, -1);
        }

        public int root(int x) {
            return upper[x] < 0 ? x : (upper[x] = root(upper[x]));
        }

        public boolean equiv(int x, int y) {
            return root(x) == root(y);
        }

        public boolean union(int x, int y) {
            x = root(x);
            y = root(y);
            if (x != y) {
                if (upper[y] < upper[x]) {
                    int d = x;
                    x = y;
                    y = d;
                }
                upper[x] += upper[y];
                upper[y] = x;
            }
            return x == y;
        }
    }
    public static int[] radixSort(int[] f) {
        int[] to = new int[f.length];
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]&0xffff)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]&0xffff]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]>>>16)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]>>>16]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        return f;
    }
    public void printArray(int[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    public int[] scanArrayI(int n){
        int a[] = new int[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextInt();
        return a;
    }
    public long[] scanArrayL(int n){
        long a[] = new long[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextLong();
        return a;
    }
    public void printArray(long[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        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 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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            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 boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new TaskB(),"TaskB",1<<26).start();
    }
}


import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

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

public class TaskB implements Runnable {
    boolean prime[] = new boolean[100001];
    void sieveOfEratosthenes(int n) {
        for (int i = 0; i < n; i++)
            prime[i] = true;
        for (int p = 2; p * p <= n; p++) {
            if (prime[p] == true) {
                for (int i = p * p; i <= n; i += p)
                    prime[i] = false;
            }
        }
    }
    InputReader c;
    PrintWriter w;
    public void run() {
        c = new InputReader(System.in);
        w = new PrintWriter(System.out);
        char s[] = c.next().toCharArray();
        int n = s.length;
        ArrayList<Character> withoutzero = new ArrayList<>();
        int ones = 0;
        for(int i=0;i<n;i++)
            if(s[i]=='1') ones++;
            else withoutzero.add(s[i]);
        ArrayList<Character> ans = new ArrayList<>();
        for(int i=0;i<withoutzero.size();i++){
            if(withoutzero.get(i)=='0') ans.add('0');
            else{
                for(int j=0;j<ones;j++) ans.add('1');
                ans.add('2');
                ones = 0;
            }
        }
        if(ans.size()==0) for(int i=0;i<ones;i++) w.print('1');
        else for(int i=0;i<n;i++) w.print(ans.get(i));
        w.println();
        w.close();
    }

    public static void sortbyColumn(int arr[][], int col){
        Arrays.sort(arr, new Comparator<int[]>()
        {
            public int compare(int[] o1, int[] o2){
                return(Integer.valueOf(o1[col]).compareTo(o2[col]));
            }
        });

    }
    static long gcd(long a, long b){
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    public static class DJSet {
        public int[] upper;

        public DJSet(int n) {
            upper = new int[n];
            Arrays.fill(upper, -1);
        }

        public int root(int x) {
            return upper[x] < 0 ? x : (upper[x] = root(upper[x]));
        }

        public boolean equiv(int x, int y) {
            return root(x) == root(y);
        }

        public boolean union(int x, int y) {
            x = root(x);
            y = root(y);
            if (x != y) {
                if (upper[y] < upper[x]) {
                    int d = x;
                    x = y;
                    y = d;
                }
                upper[x] += upper[y];
                upper[y] = x;
            }
            return x == y;
        }
    }
    public static int[] radixSort(int[] f) {
        int[] to = new int[f.length];
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]&0xffff)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]&0xffff]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]>>>16)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]>>>16]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        return f;
    }
    public void printArray(int[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    public int[] scanArrayI(int n){
        int a[] = new int[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextInt();
        return a;
    }
    public long[] scanArrayL(int n){
        long a[] = new long[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextLong();
        return a;
    }
    public void printArray(long[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        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 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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            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 boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new TaskB(),"TaskB",1<<26).start();
    }
}


import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;

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

public class TaskB implements Runnable {
    boolean prime[] = new boolean[100001];
    void sieveOfEratosthenes(int n) {
        for (int i = 0; i < n; i++)
            prime[i] = true;
        for (int p = 2; p * p <= n; p++) {
            if (prime[p] == true) {
                for (int i = p * p; i <= n; i += p)
                    prime[i] = false;
            }
        }
    }
    InputReader c;
    PrintWriter w;
    public void run() {
        c = new InputReader(System.in);
        w = new PrintWriter(System.out);
        char s[] = c.next().toCharArray();
        int n = s.length;
        ArrayList<Character> withoutzero = new ArrayList<>();
        int ones = 0;
        for(int i=0;i<n;i++)
            if(s[i]=='1') ones++;
            else withoutzero.add(s[i]);
        ArrayList<Character> ans = new ArrayList<>();
        for(int i=0;i<withoutzero.size();i++){
            if(withoutzero.get(i)=='0') ans.add('0');
            else{
                for(int j=0;j<ones;j++) ans.add('1');
                ans.add('2');
                ones = 0;
            }
        }
        for(int i=0;i<n;i++) w.print(ans.get(i));
        w.println();
        w.close();
    }

    public static void sortbyColumn(int arr[][], int col){
        Arrays.sort(arr, new Comparator<int[]>()
        {
            public int compare(int[] o1, int[] o2){
                return(Integer.valueOf(o1[col]).compareTo(o2[col]));
            }
        });

    }
    static long gcd(long a, long b){
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
    public static class DJSet {
        public int[] upper;

        public DJSet(int n) {
            upper = new int[n];
            Arrays.fill(upper, -1);
        }

        public int root(int x) {
            return upper[x] < 0 ? x : (upper[x] = root(upper[x]));
        }

        public boolean equiv(int x, int y) {
            return root(x) == root(y);
        }

        public boolean union(int x, int y) {
            x = root(x);
            y = root(y);
            if (x != y) {
                if (upper[y] < upper[x]) {
                    int d = x;
                    x = y;
                    y = d;
                }
                upper[x] += upper[y];
                upper[y] = x;
            }
            return x == y;
        }
    }
    public static int[] radixSort(int[] f) {
        int[] to = new int[f.length];
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]&0xffff)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]&0xffff]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        {
            int[] b = new int[65537];
            for(int i = 0;i < f.length;i++)b[1+(f[i]>>>16)]++;
            for(int i = 1;i <= 65536;i++)b[i]+=b[i-1];
            for(int i = 0;i < f.length;i++)to[b[f[i]>>>16]++] = f[i];
            int[] d = f; f = to;to = d;
        }
        return f;
    }
    public void printArray(int[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    public int[] scanArrayI(int n){
        int a[] = new int[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextInt();
        return a;
    }
    public long[] scanArrayL(int n){
        long a[] = new long[n];
        for(int i=0;i<n;i++)
            a[i] = c.nextLong();
        return a;
    }
    public void printArray(long[] a){
        for(int i=0;i<a.length;i++)
            w.print(a[i]+" ");
        w.println();
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        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 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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            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 boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    public static void main(String args[]) throws Exception {
        new Thread(null, new TaskB(),"TaskB",1<<26).start();
    }
}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.*;
import java.util.Scanner;

public class DSU {

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        try (PrintWriter or = new PrintWriter(System.out)) {
            char[] a= in.next().toCharArray();
            int s=a.length;
            for (int i = 0; i < s-1; ++i) {
                if(a[i]=='1'&&a[i+1]=='0'||a[i]=='2'&&a[i+1]=='1'){
                    char temp=a[i];
                    a[i]=a[i+1];
                    a[i+1]=temp;
                    if(i-2!=-2)
                    i-=2;
                    else --i;
                }
            }
            or.print(new String(a));
        }

    }

}
class Pair4  implements Comparable<Pair4>{

    int value;
    int index;

    // int min;
    public Pair4(int value, int index) {
        this.value = value;
        this.index = index;
        //min = m;
    }

    @Override
    public int compareTo(Pair4 o) {
        return (Math.abs(value-index))-(Math.abs(o.value-o.index));
    }

}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.*;
import java.util.Scanner;

public class DSU {

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        try (PrintWriter or = new PrintWriter(System.out)) {
            char[] a= in.next().toCharArray();
            int s=a.length,o=0;
            for (int i = 0; i < s; i++)     if(a[i]=='1')++o;
            int end=0,z=0;
            for (int i = 0; i < s; i++) {
                if(a[i]=='2')break;
                if(a[i]=='0')++z;
                ++end;
            }
            StringBuilder p = new StringBuilder();
            while (z-->0)     p.append('0');
            while (o-->0)     p.append('1');
            for (int i = end; i < s; i++)     if(a[i]!='1')p.append(a[i]);
            or.print(p);

        }

    }

}
class Pair4  implements Comparable<Pair4>{

    int value;
    int index;

    // int min;
    public Pair4(int value, int index) {
        this.value = value;
        this.index = index;
        //min = m;
    }

    @Override
    public int compareTo(Pair4 o) {
        return (Math.abs(value-index))-(Math.abs(o.value-o.index));
    }

}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.*;
import java.util.Scanner;

public class DSU {

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        try (PrintWriter or = new PrintWriter(System.out)) {
            char[] a= in.next().toCharArray();
            int s=a.length;
            for (int i = 0; i < s-1; ++i) {
                if(a[i]=='1'&&a[i+1]=='0'||a[i]=='2'&&a[i+1]=='1'){
                    char temp=a[i];
                    a[i]=a[i+1];
                    a[i+1]=temp;
                    if(i-2!=-2)i-=2;
                    else i=0;
                }
            }
            or.print(new String(a));
        }

    }

}
class Pair4  implements Comparable<Pair4>{

    int value;
    int index;

    // int min;
    public Pair4(int value, int index) {
        this.value = value;
        this.index = index;
        //min = m;
    }

    @Override
    public int compareTo(Pair4 o) {
        return (Math.abs(value-index))-(Math.abs(o.value-o.index));
    }

}


import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.*;
import java.util.Scanner;

public class DSU {

    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        try (PrintWriter or = new PrintWriter(System.out)) {
            char[] a= in.next().toCharArray();
            int s=a.length;
            for (int i = 0; i < s-1; ++i) {
                if(a[i]=='1'&&a[i+1]=='0'||a[i]=='2'&&a[i+1]=='1'){
                    char temp=a[i];
                    a[i]=a[i+1];
                    a[i+1]=temp;

                    i=0;
                }
            }
            or.print(new String(a));
        }

    }

}
class Pair4  implements Comparable<Pair4>{

    int value;
    int index;

    // int min;
    public Pair4(int value, int index) {
        this.value = value;
        this.index = index;
        //min = m;
    }

    @Override
    public int compareTo(Pair4 o) {
        return (Math.abs(value-index))-(Math.abs(o.value-o.index));
    }

}


import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class temp
{

	void solve()
	{
		FastReader sc =new FastReader();
		String s = sc.next();
		int n = s.length();

		if(n==1)
		{
			System.out.println(s);
			return;
		}

		ArrayList<Integer> z = new ArrayList<>();
		ArrayList<Integer> o = new ArrayList<>();
		ArrayList<Integer> t = new ArrayList<>();

		for(int i=0;i<n;i++)
		{
			if(s.charAt(i)=='2')
				t.add(2);
			else if(s.charAt(i)=='1')
				o.add(1);
			else
			{
				if(t.isEmpty())
					z.add(0);
				else
					t.add(0);
			}
		}

		for(int i:z)
			System.out.print(i);

		for(int i:o)
			System.out.print(i);

		for(int i:t)
			System.out.print(i);
	}

    public static void main(String[] args)
    {
        new temp().solve();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class temp
{

	void solve()
	{
		FastReader sc =new FastReader();
		String s = sc.next();
		int n = s.length();

		if(n==1)
		{
			System.out.println(s);
			return;
		}

		int a[] = new int[3];

		for(int i=0;i<n;i++)
		{
			if(a[2]!=0 && s.charAt(i)=='0')
			{
				for(int j=0;j<a[0];j++)
					System.out.print("0");
				for(int j=0;j<a[1];j++)
					System.out.print("1");
				for(int j=0;j<a[2];j++)
					System.out.print("2");
				a = new int[3];
			}
			a[s.charAt(i)%48]++;
		}

		for(int j=0;j<a[0];j++)
			System.out.print("0");
		for(int j=0;j<a[1];j++)
			System.out.print("1");
		for(int j=0;j<a[2];j++)
			System.out.print("2");
	}

    public static void main(String[] args)
    {
        new temp().solve();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class temp
{

	class pair
	{
		int f,s;
		public pair(int f,int s)
		{
			this.f = f;
			this.s = s;
		}
	}

	void solve()
	{
		FastReader sc =new FastReader();
		String s = sc.next();
		int n = s.length();

		if(n==1)
		{
			System.out.println(s);
			return;
		}

		pair p[] = new pair[n];

		int c = 0,index = 0;
		for(int i=0;i<s.length()-1;i++)
		{
			if(s.charAt(i)!=s.charAt(i+1))
			{
				p[index++] = new pair(s.charAt(i)%48 , c+1);
				c = 0;
			}
			else
				c++;
		}

		if(s.charAt(n-1)!=s.charAt(n-2))
			p[index++] = new pair(s.charAt(n-1)%48,1);
		else
			p[index++] = new pair(s.charAt(n-1)%48,c);

		for(int i=0;i<index;i++)
		{
			if(p[i].f==0)
				continue;

			if(i+1 == index)
				break;

			if(p[i].f==1 && p[i+1].f==0)
			{
				pair temp = p[i];
				p[i] = p[i+1];
				p[i+1] = temp;

				if(i+2<index && p[i+2].f==1)
				{
					p[i+2].f = p[i+1].f;
					p[i+2].s += p[i+1].s;
					p[i+1].s = 0;
					i++;
				}
			}

			if(p[i].f==2 && p[i+1].f==1)
			{
				pair temp = p[i];
				p[i] = p[i+1];
				p[i+1] = temp;

				if(i+2<index && p[i+2].f==2)
				{
					p[i+2].f = p[i+1].f;
					p[i+2].s += p[i+1].s;
					p[i+1].s = 0;
					i++;
				}
			}
		}

		for(int i=0;i<index;i++)
		{
			for(int j=0;j<p[i].s;j++)
				System.out.print(p[i].f);
		}
	}

    public static void main(String[] args)
    {
        new temp().solve();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        Scanner ob=new Scanner(System.in);
        String s=ob.next();
        int a[]=new int[s.length()];
        int g, h, i, j;
        int numone=0;
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='1')
                numone++;
        }
        j=0;
        int k=0;
        String s1="";
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                j++;
            }
            else if(s.charAt(i)=='2')
            {
                a[k]=j;
                j=0;
                k++;
            }
        }
        if(j!=0)
        {
            a[k]=j;
            k++;
        }
        for(i=1;i<=a[0];i++)
            s1=s1+'0';
        for(i=1;i<=numone;i++)
            s1=s1+'1';
        s1=s1+'2';
        for(i=1;i<k;i++)
        {
            for(int jj=1;jj<=a[i];jj++)
            {
                s1=s1+'0';
            }
            if(i!=k-1)
                s1=s1+'2';
            else
            {
                if(j!=0)
                {}
                else
                    s1=s1+'2';
            }
        }
        System.out.println(s1);
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        String s=ob.readLine();
        int a[]=new int[s.length()];
        int g, h, i, j;
        int numone=0;
        int numtwo=0;
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='1')
                numone++;
            if(s.charAt(i)=='2')
                numtwo++;
        }
        j=0;
        int k=0;
        String s1="";
        j=0;
        String s3="";
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                s1=s1+'0';
                j++;
            }
            else if(s.charAt(i)=='1')
                s3=s3+'1';
            else if(s.charAt(i)=='2')
            {
                j=0;
                s1=s1+'2';
            }
        }
        i=s1.indexOf('2');
        if(i>=0)
        {
            s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        }
        System.out.println(s1);
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        String s=ob.readLine();
        int a[]=new int[s.length()];
        int g, h, i, j;
        int numone=0;
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='1')
                numone++;
        }
        j=0;
        int k=0;
        String s1="";
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                j++;
            }
            else if(s.charAt(i)=='2')
            {
                k=i+1;
                break;
            }
        }
        for(i=1;i<=j;i++)
            s1=s1+'0';
        for(i=1;i<=numone;i++)
            s1=s1+'1';
        s1=s1+'2';
        j=0;
        for(i=k;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                j++;
            }
            else if(s.charAt(i)=='2')
            {
                for(k=1;k<=j;k++)
                    s1=s1+'0';
                //System.out.println("j "+j);
                j=0;
                s1=s1+'2';
            }
        }
        if(j!=0)
        {
            for(k=1;k<=j;k++)
                s1=s1+'0';
            //System.out.println("j "+j);
            j=0;
        }
        System.out.println(s1);
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static void main(String[] args)throws IOException
    {
        //BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        FastReader ob=new FastReader();
        String s=ob.next();
        int g, h, i, j;
        String s1="";
        String s3="";
        for(i=0;i<s.length();i++)
        {
            char x=s.charAt(i);
            if(x=='0')
            {
                s1+='0';
            }
            else if(x=='1')
                s3+='1';
            else
            {
                s1+='2';
            }
        }
        i=s1.indexOf('2');
        //if(i>=0)
        //{
        //  s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        //}
        System.out.println(s1.substring(0,i)+s3+s1.substring(i,s1.length()));
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        String s=ob.readLine();
        int g, h, i, j;
        String s1="";
        String s3="";
        for(i=0;i<s.length();i++)
        {
            char x=s.charAt(i);
            if(x=='0')
            {
                s1+='0';
            }
            else if(x=='1')
                s3+='1';
            else
            {
                s1+='2';
            }
        }
        i=s1.indexOf('2');
        //if(i>=0)
        //{
        //  s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        //}
        System.out.println(s1.substring(0,i)+s3+s1.substring(i,s1.length()));
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        String s=ob.readLine();
        int g, h, i, j;
        String s1="";
        String s3="";
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                s1+='0';
            }
            else if(s.charAt(i)=='1')
                s3+='1';
            else if(s.charAt(i)=='2')
            {
                s1+='2';
            }
        }
        i=s1.indexOf('2');
        if(i>=0)
        {
            s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        }
        System.out.println(s1);
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)throws IOException
    {
        //BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        FastReader ob=new FastReader();
        String s=ob.next();
        int g, h, i, j=0;
        String s1="";
        String s3="";

        for(i=0;i<s.length();i++)
        {
            char x=s.charAt(i);
            if(x=='0')
            {
                System.out.print("0");
            }
            else if(x=='2')
            {
                if(j==0)
                {
                    for(g=0;g<s.length();g++)
                        if(s.charAt(g)=='1')
                            System.out.print("1");
                    j=1;
                }
                System.out.print("2");
            }
        }
        if(j==0)
        {
            for(g=0;g<s.length();g++)
                if(s.charAt(g)=='1')
                    System.out.print("1");
            j=1;
        }
        //i=s1.indexOf('2');
        //if(i>=0)
        //{
        //  s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        //}
        //System.out.println(s1.substring(0,i)+s3+s1.substring(i,s1.length()));
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    public static void main(String[] args)throws IOException
    {
        BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        String s=ob.readLine();
        int a[]=new int[s.length()];
        int g, h, i, j;
        int numone=0;
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='1')
                numone++;
        }
        j=0;
        int k=0;
        String s1="";
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='0')
            {
                j++;
            }
            else if(s.charAt(i)=='2')
            {
                a[k]=j;
                j=0;
                k++;
            }
        }
        if(j!=0)
        {
            a[k]=j;
            k++;
        }
        for(i=1;i<=a[0];i++)
            s1=s1+'0';
        for(i=1;i<=numone;i++)
            s1=s1+'1';
        s1=s1+'2';
        for(i=1;i<k;i++)
        {
            for(int jj=1;jj<=a[i];jj++)
            {
                s1=s1+'0';
            }
            if(i!=k-1)
                s1=s1+'2';
            else
            {
                if(j!=0)
                {}
                else
                    s1=s1+'2';
            }
        }
        System.out.println(s1);
    }
}


import java.io.*;
import java.util.*;
public class Solution
{
    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static void main(String[] args)throws IOException
    {
        //BufferedReader ob=new BufferedReader(new InputStreamReader(System.in));
        FastReader ob=new FastReader();
        String s=ob.next();
        int g, h, i, j=0;
        String s1="";
        String s3="";

        for(i=0;i<s.length();i++)
        {
            char x=s.charAt(i);
            if(x=='0')
            {
                System.out.print("0");
            }
            else if(x=='2')
            {
                if(j==0)
                {
                    for(g=0;g<s.length();g++)
                        if(s.charAt(g)=='1')
                            System.out.print("1");
                    j=1;
                }
                System.out.print("2");
            }
        }
        //i=s1.indexOf('2');
        //if(i>=0)
        //{
        //  s1=s1.substring(0,i)+s3+s1.substring(i,s1.length());
        //}
        //System.out.println(s1.substring(0,i)+s3+s1.substring(i,s1.length()));
    }
}