#include <bits/stdc++.h>

using namespace std;

int x, y;
int n;

int main()
{
    cin.tie(false); cout.tie(false); 
    cin >> x >> y;
    int a, b;
    int i = 1;
    while (x || y){
        a = x % 10;
        b = y % 10;
        if (a>b) n += a*i;
        if (b>a) n += b*i;
        if (a==b) {
             n += a*i;
             if (a)i*=10;
             n += b*i;
        }
        x/=10;
        y/=10;
        i*=10;
    }
    cout << n;
    return 0;
}