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)
        {
            long a = Convert.ToInt64(Console.ReadLine());
            long b = Convert.ToInt64(Console.ReadLine());
            long c = 0;
            long 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);
        }
    }
}