#include<iostream>
#include<deque>
#include<stack>
using namespace std;
stack<int> stk1;
stack<int> stk2;
stack<char> result;
int main()
{
int c;
while((c=getchar())!='\n'&&c!=' '&&c!='\t')
{
stk1.push(c-'0');
}
while((c=getchar())!='\n'&&c!=' '&&c!='\t'&&c!=EOF)
{
stk2.push(c-'0');
}
int past=0;
char tem;
while(!stk1.empty())
{
if(!stk2.empty())
{
tem=stk1.top()+stk2.top()+past;
past=tem/10;
result.push(tem%10);
stk1.pop();
stk2.pop();
}
else{
if(!stk1.empty())
{
result.push(stk1.top()+past);
past=0;
stk1.pop();
}
while(!stk1.empty())
{
result.push(stk1.top());
stk1.pop();
}
}
}
if(!stk2.empty())
{
result.push(stk2.top()+past);
past=0;
stk2.pop();
}
while(!stk2.empty())
{
result.push(stk2.top());
stk2.pop();
}
if(past!=0)
{
printf("%d",past);
}
while(!result.empty())
{
printf("%d",result.top());
result.pop();
}
}