#include <stdio.h>
#include <math.h>

main(){
	int x,y,max,a=0,k=1;
	scanf("%d%d", &x, &y);
	if(x>=y) max =x;
	else max =y;
	while(max>0) {
		if(x%10>=y%10) a=a+(x%10)*k;
		else a=a+(y%10)*k;
		k*=10;
		x/=10;
		y/=10;
		max/=10;
	}
	printf("%d", a);
}