using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            ulong a = Convert.ToUInt64(Console.ReadLine());
            ulong b = Convert.ToUInt64(Console.ReadLine());
            ulong c = 0;
            ulong n = 0;
            while (a >= 1 || b >= 1)
            {
                if (a % 10 < b % 10 || a == 0)
                {
                    c += b % 10 * Convert.ToUInt64(Math.Pow(10, n));
                }
                else if (a % 10 > b % 10 || b == 0)
                {
                    c += a % 10 * Convert.ToUInt64(Math.Pow(10, n));
                }
                else
                {
                    c += (a % 10) * Convert.ToUInt64(Math.Pow(10, n));
                    n += 1;
                    c += (a % 10) * Convert.ToUInt64(Math.Pow(10, n));
                }
                n += 1;
                a /= 10;
                b /= 10;
            }
            Console.WriteLine(c);
        }
        
    }
}