#include <bits/stdc++.h>
using namespace std;
int makeint(string x) {
  int i;
  stringstream ss;
  ss << x;
  ss >> i;
  return i;
}
int main() {
  string a, b;
  cin >> a >> b;
  reverse(b.begin(), b.end());
  cout << makeint(a) + makeint(b) << endl;
  return 0;
}
