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



int main(int argc, char *argv[]) 
{
	int n,ox,oy;
	long x,y;
	long long brojac=1,br=0;
	scanf("%ld%ld", &x,&y);
	if(x>y)
	{
		while(x)
		{
			
			if(y>0)
			{
				oy=y%10;
			}
			else
			{
				oy=-1;
			}
			ox=x%10;
			
			if(ox>oy)
			{
				br=br+brojac*ox;
			}
			if(oy>ox)
			{
				br=br+brojac*oy;
			}
			if(ox==oy)
			{
				br=br+brojac*ox;
				brojac=brojac*10;
				br=br+brojac*ox;
			}
			brojac=brojac*10;
			y=y/10;
			x=x/10;
		}
	}
	else
	{
		while(y)
		{
			{
				if(x>0)
				{
					ox=x%10;
				}
				else
				{
					ox=-1;
				}
			
			oy=y%10;
			if(ox>oy)
			{
				br=br+brojac*ox;
			}
			if(oy>ox)
			{
				br=br+brojac*oy;
			}
			if(ox==oy)
			{
				br=br+brojac*ox;
				brojac=brojac*10;
				br=br+brojac*ox;
			}
			brojac=brojac*10;
			y=y/10;
			x=x/10;
		}
		}
	}
	printf("%lld",br);
	return 0;
}