#include <bits/stdc++.h>
using namespace std;
int a[10005], b[10005], c[10005];
int main()
{
string sa, sb;
//把大数用字符串读入
cin >> sa;
cin >> sb;
//把字符串一一对应到数组存储
int la = sa.size();
reverse(sa.begin(), sa.end()); //为啥要翻转
for (int i = 0; i < la; i++)
a[i] = sa[i] - '0';
int lb = sb.size();
reverse(sb.begin(), sb.end());
for (int i = 0; i < lb; i++)
b[i] = sb[i] - '0';
int len = max(la, lb); //数组运算的位数取决于长的那个数组长度
for (int i = 0; i < len; i++)//按位相加
c[i] = a[i] + b[i];
int jw = 0;//考虑进位
for (int i = 0; i < len; i++)
{
c[i] += jw;
jw = c[i] / 10;
c[i] %= 10;
}
if (jw) c[len] = 1; //len是实际反向输出的最高位,最地位的下标0。
else len--;
//反向输出答案
for (int i = len; i >= 0; i--)
cout << c[i];
return 0;
}