#include <iostream>

using namespace std;

int main()
{
    int x, y;
    cin >> x >> y;

    int d = 1;
    long long nbr = 0;

    int c1, c2;

    while(x > 0 || y > 0){

        c1 = x%10;
        c2 = y%10;

        if (c1 > c2){
            nbr = nbr + c1*d;
        }

        else if (c2 > c1){
            nbr = nbr + c2*d;
        }

        else if (c1 == c2){
            nbr = nbr + c1*d + c2*d*10;
            d *= 10;
        }

        d *= 10;
        x /= 10;
        y /= 10;

        if (x == 0 && y > 0){
            nbr = nbr + y*d;
            break;
        }

        else if (x > 0 && y == 0){
           nbr = nbr + x*d;
           break;
        }

    }

    cout << nbr;

    return 0;
}