#include <iostream>

using namespace std;

int main()
{
	long long X,Y,Z=0,Z1=0,x,y;
	cin>>X>>Y;
	while(X>0 or Y>0)
	{
		x=X%10;
		y=Y%10;
		if(x>y)
		Z=Z*10+x;
		if(y>x)
		Z=Z*10+y;
		if(x==y)
		Z=100*Z+11*x;
		X=X/10;
		Y=Y/10;
	}
	while(Z>0)
	{
		Z1=10*Z1+Z%10;
		Z=Z/10;
	}
	cout<<Z1;
}