#include <iostream>
using namespace std;
const int N = 10001;
int first = 0;
void plus_(string n, string m){
int nlen = n.size(), mlen = m.size();
int mi = m.size() - 1;
for(int i = nlen - 1; i >= 0; i--){
if(mi >= 0){
n[i] = ((n[i] - '0') + (m[mi] - '0')) + '0';
mi--;
}
}
for(int i = 0; i < nlen; i++){
if(n[i] - '0' > 9){
int ml = 0;
n[i] = ((n[i] - '0') % 10) + '0';
if(i != 0){
n[i - 1] = ((n[i - 1] - '0') + (n[i] - '0') / 10 + 1) + '0';
}else{
first = ((n[i - 1] - '0') + (n[i] - '0') / 10 + 1) + '0';
}
}
}
if(first == 0){
for(int i = 0; i < nlen; i++){
cout << n[i];
}
}else{
cout << first;
for(int i = 0; i < nlen; i++){
cout << n[i];
}
}
}
int main(){
string n, m;
cin >> n >> m;
plus_(n, m);
return 0;
}