#include <bits/stdc++.h>

using namespace std;

int a[10],b[10];

int main(){
    int x,y; cin>>x>>y;
    int t=0;
    while(x>0){
        a[t]=x%10; x/=10; t++;
    }
    int j=t;
    t=0;
    while(y>0){
        b[t]=y%10; y/=10; t++;
    }
    int maksi=max(t,j);
    int res=0;
    for(int i=0;i<maksi;i++){
        if(a[i]>b[i]){
            res+=a[i]; res*=10;
        }else if(a[i]<b[i]){
            res+=b[i]; res*=10;
        }else if(a[i]==b[i] && i<t && i<j){
            res+=a[i]; res*=10;
            res+=a[i]; res*=10;
        }else{
            res+=a[i]; res*=10;
        }
    }
    int ress=0;
    while(res>0){
        ress+=(res%10); res/=10;
        ress*=10;
    }
    ress/=10;
    cout<<ress;
    return 0;
}