#include <iostream>
#include <math.h>
using namespace std;

int main()
{int X,x,Y,y,n,N,z,a;
    cin>>X;
    cin>>Y;
    a=X+Y;
    X=(X+Y-abs(X-Y))/2;
    Y=a-X;
    N=0;
    n=0;
    
    while (X>0)
    {x=X%10;
     X=(X-x)/10;
    
     y=Y%10;
     Y=(Y-y)/10;
     
     if (y>x)
    {z=y;
    N=N+z*pow(10,n);
    }
    else if (y<x)
    {z=x;
    N=N+z*pow(10,n);
    }
    else
    {z=x+x*10;
    N=N+z*pow(10,n);
    n++;
    }
    n++;
    }
 
    cout<<N;
    
    return 0;
}