#include <bits/stdc++.h>
using namespace std;

int main()
{
    int a, b; cin >> a >> b;
    int resenje = 0;
    int n = 1;
    
    while(a > 0 && b > 0){
        if(a%10 > b%10){
            resenje += a%10 * n;
            n *= 10;
        }
        else if(a%10 < b%10){
            resenje += b%10 * n;
            n *= 10;
        }
        else{
            resenje += a%10 * n;
            n *= 10;
            resenje += b%10 * n;
            n *= 10;
        }
        a/=10;
        b/=10;
        
    }
    if(a == 0)
        resenje += b* n;
    if(b == 0)
        resenje += a*n;
        
    cout << resenje << endl;

    return 0;
}