#include <stdio.h>
main(){
	int a,b,out = 0,ca,cb,i = 1;
	scanf("%d%d", &a,&b);
	while (a > 0 || b > 0){
		ca = a % 10;
		cb = b % 10;
		if (ca > cb){
			out += ca * i;
		} else if (cb > ca){
			out += cb * i;
		} else {
			out += ca * i;
			i *= 10;
			out += cb * i;
		}
		a /= 10;
		b /= 10;
		i *= 10;
	}
	printf("%d", out);
}