#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main() {
string str;
string str1;
cin >> str >> str1;
reverse(str.begin(), str.end());
reverse(str1.begin(), str1.end());
int i = 0, j = 0;
int n = str.length(), m = str1.length();
string str2;
int d = 0;
while (i < n && j < m) {
int a = str[i] - '0';
int b = str1[j] - '0';
int c = a + b + d;
if (c > 9) {
d = c / 10;
c = c % 10;
}
else {
d = 0;
}
str2.push_back(c + '0');
i++, j++;
}
while (i < n) {
int a = str[i] - '0';
int c = a + d;
if (c > 9) {
d = c / 10;
c = c % 10;
}
else {
d = 0;
}
str2.push_back(c + '0');
i++;
}
while (j < m) {
int a = str1[j] - '0';
int c = a + d;
if (c > 9) {
d = c / 10;
c = c % 10;
}
else {
d = 0;
}
str2.push_back(c + '0');
j++;
}
if (d != 0) {
str2.push_back(d + '0');
}
reverse(str2.begin(), str2.end());
cout << str2 << endl;
return 0;
}