#include <iostream>
using namespace std;

int main()
{
	int x, y;
	cin >> x >> y;
	int n = 0, x_rem, y_rem, factor = 1;
			
	while (x != 0 || y != 0) {
		if (x != 0) {
			x_rem = x % 10;
			x /= 10;
		}
		else x_rem = 0;
				
		if (y != 0) {
			y_rem = y % 10;
			y /= 10;
		}
		else y_rem = 0;	
		
		if (x_rem > y_rem) n += x_rem * factor;
		else if (x_rem < y_rem) n += y_rem * factor;
		else if (x_rem != 0 && x_rem == y_rem) {
			n += x_rem * factor;
			factor *= 10;
			n += y_rem * factor;
		}
				
		factor *= 10;
	}
	
	cout << n;
	
	return 1;
}