package javaapplication1;

import java.io.BufferedReader;
import java.io.Console;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class More {

    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String s = bf.readLine();
        while (!s.equals(null)) {
            char[] c = rozdel(s);
            if (c[c.length - 1] == '0') {
                c[c.length - 1] = '1';
                vypis(c);
            } else {
                c[c.length - 1] = '0';
                boolean end = false;
                boolean special = false;
                for (int i = c.length - 2; i >= 0; i -= 2) {
                    switch (vyhodnot(i > 0 ? c[i - 1] : '0', c[i])) {
                        case 1:
                            c[i] = '0';
                            vypis(c);
                            end = true;
                            break;
                        case 2:
                            c[i - 1] = '1';
                            c[i] = '1';
                            vypis(c);
                            end = true;
                            break;
                        case 3:
                            c[i] = '0';
                            vypis(c);
                            end = true;
                            break;
                        case 4:
                            c[i] = '1';
                            c[i - 1] = '0';
                            special = true;
                            break;
                    }
                    if (end) {
                        break;
                    }

                }
                if ((special || c.length % 2 == 1) && !end) {
                    System.out.print("11");
                    if (c.length > 1) {
                        System.out.print("0");
                    }
                    vypis(c);

                }

            }
            s = bf.readLine();
        }
    }

    public static char[] rozdel(String s) {
        char[] c = new char[s.length()];
        for (int i = 0; i < s.length(); i++) {
            c[i] = s.charAt(i);
        }
        return c;
    }

    public static int vyhodnot(char a, char b) {
        if (a == '0') {
            if (b == '1') {
                return 1;
            } else {
                return 2;
            }
        } else {
            if (b == '1') {
                return 3;
            } else {
                return 4;
            }
        }
    }

    public static void vypis(char[] c) {
        int i = 0;
        while (c[i] == '0' && i < c.length - 1) {
            i++;
        }
        for (int q = i; q < c.length; q++) {
            System.out.print(c[q]);
        }
        System.out.print('\n');
    }
}
