#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int x, y;
    unsigned long long int z=0, s=1;
    cin>> x >> y;
    while(x!=0 && y!=0){
        if (x%10>y%10)
            z=z+(x%10)*s;
        else if (x%10<y%10)
            z=z+(y%10)*s;
        else {
            z=z+(x%10)*s*11;
            s=s*10;
        }
        s=(unsigned long long int)s*10;
        x=x/10;
        y=y/10;
    }
    if (x!=0)
        z=z+x*s;
    else
        z=z+y*s;
    cout<< z ;
    return 0;
}