using System;

namespace ConsoleApp23
{
    internal class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            string eredmeny = "";

            if (x.Length < y.Length)
            {
                while (x.Length != y.Length)
                {
                    x = x.Insert(0, "0");
                }
            }
            else if (y.Length < x.Length)
            {
                while (x.Length != y.Length)
                {
                    y = y.Insert(0, "0");
                }
            }

            int i = 0;
            if (x[0] == '0')
            {
                while (x[i] == '0')
                {
                    eredmeny = eredmeny.Insert(i, y[i].ToString());
                    i++;
                }
                int f = i;
                for (int j = i; j < x.Length; j++)
                {
                    if (x[j] == y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        eredmeny = eredmeny.Insert(f + 1, x[j].ToString());
                        f += 2;
                    }
                    else if (x[j] > y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        f++;
                    }
                    else
                    {
                        eredmeny = eredmeny.Insert(f, y[j].ToString());
                        f++;
                    }
                }
            }
            else if (y[0] == '0')
            {
                while (y[i] != '0')
                {
                    eredmeny = eredmeny.Insert(i, x[i].ToString());
                    i++;
                }
                int f = 0;
                for (int j = i; j < x.Length; j++)
                {
                    if (x[j] == y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        eredmeny = eredmeny.Insert(f + 1, x[j].ToString());
                        f += 2;
                    }
                    else if (x[j] > y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        f++;
                    }
                    else
                    {
                        eredmeny = eredmeny.Insert(f, y[j].ToString());
                        f++;
                    }
                }
            }
            else
            {
                int f = 0;
                for (int j = 0; j < x.Length; j++)
                {
                    if (x[j] == y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        eredmeny = eredmeny.Insert(f + 1, x[j].ToString());
                        f += 2;
                    }
                    else if (x[j] > y[j])
                    {
                        eredmeny = eredmeny.Insert(f, x[j].ToString());
                        f++;
                    }
                    else
                    {
                        eredmeny = eredmeny.Insert(f, y[j].ToString());
                        f++;
                    }
                }
            }

            Console.WriteLine(eredmeny);
            //Console.ReadKey();
        }
    }
}