using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = int.Parse(Console.ReadLine());
            int y = int.Parse(Console.ReadLine());
            int z = 0;
            while (x != 0 || y!=0)
            {
                int x1 = x % 10;
                int y1 = y % 10;
                if(x1==0)
                {
                    z *= 10;
                    z += y1;
                }
                else if(y1==0)
                {
                    z *= 10;
                    z += x1;
                }
                else if(x1>y1)
                {
                    z *= 10;
                    z += x1;
                }
                else if(y1>x1)
                {
                    z *= 10;
                    z += y1;
                }
                else
                {
                    z *= 10;
                    z += x1;
                    z *= 10;
                    z += y1;
                }
                x /= 10;
                y /= 10;
            }
            int z1 = 0;
            while(z!=0)
            {
                z1 *= 10;

                z1 += z % 10;
                z /= 10;
            }
            Console.WriteLine("{0}", z1);
        }
    }
}