#include <iostream>
#include <string>
using namespace std;
int top=0;
int arr[100000];
void input(int tmp){
arr[top++]= tmp;
}
void output(){
top--;
arr[top]=0;
for(;;){
top--;
cout <<arr[top];
}
}
int main(){
string a;
string b;
cin >> a >> b;
int c=0,tmp;
int lena = a.length()-1;
int lenb = b.length()-1;
while(true)
{
if(lenb==0)
{
tmp=a.at(lena--)-'0'+c;
}
else if(lena==0)
{
tmp=b.at(lenb--)-'0'+c;
}
else
{
tmp=a.at(lena--)+b.at(lenb--)-'0'*2+c;
}
input(tmp%10);
c=tmp/10;
if(lena==0&&lenb==0)
{
break;
}
}
if(c==1)
{
input(1);
}
output();
}