using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = Convert.ToInt32(Console.ReadLine());
            int y = Convert.ToInt32(Console.ReadLine());
            int n = 0,k=1;
            while (x>0 && y>0)
            {
                if (x % 10 > y % 10) 
                {
                    n = n + (x % 10) * k;
                    k *= 10;
                    x /= 10;
                    y/= 10;
                }
                else if (x % 10 < y % 10)
                {
                    n = n + (y % 10) * k;
                    k *= 10;
                    x /= 10;
                    y /= 10;
                }
                else if (x % 10 == y % 10)
                {
                        n = n + ((x % 10) * k) + ((y % 10) * k * 10);
                        k *= 100;
                        x /= 10;
                        y /= 10;
                }
            }
            if (x!=0)
            {
                n = n + x * k;
            }
            else if (y!=0)
            {
                n = n + y * k;
            }
            Console.WriteLine(n);
        }
    }
}