import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner skener = new Scanner(System.in);
        int x = skener.nextInt();
        int y = skener.nextInt();

        int novibr = 0;
        int br = 1;

        while (x != 0 && y != 0){
            if(x % 10 > y % 10){
                novibr += (br * (x%10));
                br *= 10;

            } else if (x % 10 < y % 10) {
                novibr += (br * (y%10));
                br *= 10;
            }
            if(x % 10 == y % 10) {
                int a = (x%10) * 11;
                novibr +=  (a * br );
                br *= 100;
            }

            x /= 10;
            y /= 10;
        }


        if(x != 0) {
            while (x != 0) {
                if (x % 10 == 0) {
                    br *= 10;
                }
                novibr += ((x % 10) * br);
                x /= 10;
            }
        }
        if(y != 0) {
            while (y != 0) {
                if (y % 10 == 0) {
                    br *= 10;
                }
                novibr += ((y % 10) * br);
                y /= 10;
            }
        }

        System.out.println(novibr);
    }
}