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));
                x /= 10;
                y /= 10;
                br *= 10;
                continue;

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

        }

        if(x != 0){
            f(x, br, novibr);
        }if(y != 0){
            f(y, br, novibr);
        }


        System.out.println(novibr);
    }
    static void f(int a, int br,int novibr){
        while (a != 0){
            if(a % 10 == 0){
                br *= 10;
            }
            novibr += ((a%10) * br);
            a /= 10;
        }
    }
}