#include <bits/stdc++.h>
using namespace std;
int main() {
int a[5001], b[5001], result[5001], j;
fill_n(a, 5001, 0);
fill_n(b, 5001, 0);
string input;
cin >> input;
j = 5000;
for (int i=input.size()-1; i>=0; i--) {
a[j] = (int)input[i] - 48;
j--;
}
cin >> input;
j = 5000;
for (int i=input.size()-1; i>=0; i--) {
b[j] = (int)input[i] - 48;
j--;
}
bool shift = 0;
for (int i=5000; i>=0; i--) {
result[i] = a[i] + b[i] + shift;
if (result[i] > 9) {
result[i] -= 10;
shift = 1;
}
else
shift = 0;
}
bool first = 0;
for (int i=0; i<5001; i++) {
if (result[i])
first = 1;
if (first)
cout << result[i];
}
}