#include <stdio.h>
#include <stdlib.h>

int provera(int x)
{
    if(x>0)
        return 1;
    else
        return 0;
}

int main()
{
    long long int x,y,n=0,st=1;
    int a,b;
    scanf("%d",&x);
    scanf("%d",&y);
    while(x>0 || y>0)
    {
        if(provera(x) && provera(y))
        {
            a=x%10;
            b=y%10;
        if(a>b)
        {
           n+=st*a;
           st*=10;
        }

        else if(a<b)
        {
           n+=st*b;
           st*=10;
        }
        else
        {
            n+=st*a;
            n+=st*10*a;
            st*=100;
        }
        }
        else
        {
            if(x==0)
            {
                n+=st*(y%10);
                st*=10;
            }
            else
            {
                n+=st*(x%10);
                st*=10;
            }
        }
        x/=10;
        y/=10;
    }
    printf("%d",n);
    return 0;
}