#include <stdio.h>

#define MAX(a, b) ((a) > (b) ? (a) : (b))

int main(void)
{
	unsigned int 	x = 0,
					y = 0,
					nb = 0,
					k = 1,
					veci = 0, manji = 0, max = 0;
	scanf("%u", &x);
	scanf("%u", &y);
	veci = MAX(x, y);
	manji = x + y - veci;
	
	while(1)
	{
		max = MAX(veci % 10, manji % 10);
		if(veci % 10 == manji % 10)
		{
			if(veci % 10 != 0)
			{
				nb += veci % 10 * k;
				k *= 10;
				nb += veci % 10 * k;
			}
		}
		else
			nb += max * k;
			
		veci /= 10;
		
		if(manji != 0)
			manji /= 10;
		
		if(veci == 0)
			break;
		
		k *= 10;
	}
	
	printf("%u", nb);
	
	return 0;
}