#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int broj_cifara(long long n)
{
    int m = 0;
    while(n > 0)
    {
        m++;
        n/=10;
    }
    return m;
}
int main()
{
    long long x,y,n,m,zn,bnzn,trazeni = 0;
    cin >> x;
    cin >> y;
    int djnzn = 0;
    n = broj_cifara(x);
    m = broj_cifara(y);
    while(min(n,m) > 0)
    {
        zn = x % 10;
        bnzn = y % 10;
        if(zn > bnzn)
        {
            trazeni += zn * pow(10, djnzn);
        }
        if(zn < bnzn)
        {
            trazeni += bnzn * pow(10, djnzn);
        }
        if(zn == bnzn)
        {
            trazeni += bnzn * pow(10, djnzn + 1) + zn * pow(10, djnzn);
            djnzn++;
        }
        djnzn++;
        x/=10;
        y/=10;
        n--;
        m--;
    }
    while(n > 0)
    {
        zn = x % 10;
        trazeni += zn * pow(10, djnzn);
        x/=10;
        djnzn++;
        n--;
    }
    while(m > 0)
    {
        bnzn = y % 10;
        trazeni = trazeni + bnzn * pow(10, djnzn);
        djnzn++;
        y/=10;
        m--;
    }
    cout << trazeni;
    return 0;
}