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


    int main(){
        string a, b, k;
        cin>>a>>b;
        k = "";
        int na = a.length();
        int nb = b.length();
        int nmax = max(na,nb);
        if(na>nb){
            for(int i=na-nb; i>0; i--){
                b = '0' + b;
            }
        }
        else{
        for(int i=nb-na; i>0; i--){
                a = '0' + a;
        } 
        }

        for(int i=nmax-1; i>=0; i--){
        if(a[i] == '0' && b[i] == '0' ) k=a[i]+k;
        else if(a[i] == b[i]){
            k=a[i] + k;
            k=a[i] + k;
        }
        else if(a[i]>b[i]){
            k=a[i] + k;
        }
        else {
            k=b[i] + k;
        }
        }
        
        cout<<k;


    }