#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s1, s2;
  cin >> a >> s1;
  for (int i = 0; i <= (int)s1.length() - 1; i++) {
    s2 = s1[i] + s2;
  }
  sscanf(s2.c_str(), "%d", &b);
  cout << a + b << endl;
}
