#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  string n1 = to_string(m);
  for (int i = 0; i < n1.length() / 2; i++) {
    char s = n1[i];
    n1[i] = n1[n1.length() - 1 - i];
    n1[n1.length() - 1 - i] = s;
  }
  cout << n + stoi(n1);
  return 0;
}
