#include <bits/stdc++.h>
using namespace std;
int power(int num1, int num2) {
  int ans = 1;
  for (int i = 0; i < num2; i++) {
    ans *= num1;
  }
  return ans;
}
int main() {
  string str;
  int num1, help = 0;
  cin >> num1 >> str;
  for (int i = 0; i < str.size(); i++) {
    help += power(10, i) * (str[i] - '0');
  }
  cout << help + num1;
  return 0;
}
