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

namespace elso
{
    class Program
    {
        static void Main(string[] args)
        {
            int input1 = Convert.ToInt32(Console.ReadLine());
            int input2 = Convert.ToInt32(Console.ReadLine());

            string s1 = input1.ToString();
            string s2 = input2.ToString();

            string o = "";
            int seged = 0;
            string a = "";

            if (s1.Length > s2.Length)
            {
                a = s2;
                
                seged = s1.Length - s2.Length;
                s2 = "";
                for (int i = 0; i < seged; i++)
                    {
                        s2 += '-';
                    }
  
                s2 += a;
            }
            else if (s2.Length > s1.Length)
            {
                a = s1;
                
                seged = s2.Length - s1.Length;
                s1 = "";
                for (int i = 0; i < seged; i++)
                    {
                        s1 += '-';
                    }      
                s1 += a;
            }


            int length = (s1.Length > s2.Length) ? s1.Length : s2.Length;

            

            for (int i = 0; i < length; i++)
            {    

                if (s1[i] > s2[i] || s2[i] == '-')
                    o += s1[i];
               
                else if(s2[i] > s1[i] || s1[i] == '-')
                    o += s2[i];
                else if (s1[i] == s2[i])
                {
                    o += s1[i];
                    o += s2[i];
                }
            }


            int erd = Convert.ToInt32(o);

            Console.WriteLine(erd);

        }
    }
}