#include <bits/stdc++.h>

using namespace std;

int main()
{
    string a,b,szam="";
    cin>>a;
    cin>>b;
    int l;
    l = min(a.size(), b.size());
    if(a.size() > b.size()){
    for(int i =0; i<a.size()-l;i++){
        b = "0"+b;
    }
    }else {
    for(int i =0; i<b.size()-l;i++){
        a = "0"+a;
    }}

    for(int i=l; i>=0; i--){
        if(int(a[i]) > int(b[i])){
            szam = a[i] + szam;
        }
        else if(int(a[i]) < int(b[i])){
            szam = b[i] + szam;
        }
        else if(int(a[i]) == int(b[i])){
            szam =  b[i] + szam;
            szam =  b[i] + szam;
        }
    }




    cout<<szam;

}