int a = Convert.ToInt32(Console.ReadLine());
int b = Convert.ToInt32(Console.ReadLine());
int c = 0;
int n = 1;
while (a >= 1 || b >= 1)
{
    if(a % 10 < b % 10 || a == 0)
    {
        c += b % 10 * n;
    }
    else if (a % 10 > b % 10 || b == 0)
    {
        c += a % 10 * n;
    }
    else
    {
        c += a % 10 * n;
        n *= 10;
        c += a % 10 * n;
    }
    n *= 10;
    a /= 10;
    b /= 10;
}
Console.WriteLine(c);