#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  string s = to_string(m);
  reverse(s.begin(), s.end());
  m = stoi(s);
  long long ans = n + m;
  cout << ans << endl;
  return 0;
}
