#include <string>
#include <iostream>

using namespace std;

void merge(int x, int y)
{
    string sx, sy;
    string rez="";
    while(x > 0)
    {
        sx += to_string(x%10);
        x/=10;
    }
    while(y > 0)
    {
        sy += to_string(y%10);
        y/=10;
    }
    for(int i = 0;i<min(sx.size(), sy.size());i++)
    {
        if((int)(sx[i]-'0')>(int)(sy[i]-'0')){
            rez += sx[i];
        }
        else if((int)(sx[i]-'0')<(int)(sy[i]-'0'))
            rez+=sy[i];
        else
            rez = rez+sy[i]+sx[i];


    }
    if(sx.size()<sy.size())
    {
        for(int i = sx.size();i<sy.size();i++)
        {
            rez+=sy[i];
        }
    }
    else if(sx.size()>sy.size())
    {
        for(int i = sy.size();i<sx.size();i++)
        {
            rez+=sx[i];
        }
    }
    for(int i = rez.size()-1;i>=0;i--)
    {
        cout << rez[i];
    }
}

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