#include <bits/stdc++.h>
using namespace std;
void solve() {
  string a, b;
  cin >> a >> b;
  reverse(b.begin(), b.end());
  cout << atoi(a.c_str()) + atoi(b.c_str()) << endl;
}
int main() {
  solve();
  return 0;
}
