#include<stdio.h>
#include<iostream>
#include<math.h>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int x, y, r = 0, i = 0;
	cin >> x >> y;
	while (y != 0 || x != 0) {
		int cx = x % 10, cy = y % 10;
		if (cx > cy) {
			r += cx * (int)pow(10, i);
		}
		else if (cx < cy) {
			r += cy * (int)pow(10, i);
		}
		else {
			r += cx * 11 * (int)pow(10, i);
			if (cx)i++;
		}
		x /= 10; y /= 10;
		i++;
	}
	cout << r;
}