#include <bits/stdc++.h>
using namespace std;
  string x,y,s;
  int a,b;
int main(){
  cin >> x >> y;
  a=x.size();
  b=y.size();
  reverse(x.begin(),x.end());
  reverse(y.begin(),y.end());
  if(a>b){
    for(int i=b; i<a; i++){
      y.push_back('0');
    }
  }
  else if(a<b){
    for(int i=a; i<b; i++){
      x.push_back('0');
    }
  }
  for(int i=a; i>=0; i--){
    if(x[i]>y[i]){s+=x[i];}
    else if(x[i]==y[i]){s+=x[i]; s+=x[i];}
    else if(x[i]<y[i]){s+=y[i];}
  }
  cout << s << endl;
  return 0;
}