#include <bits/stdc++.h>
using namespace std;
string tostr(long long x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
long long toint(string &s) {
  stringstream ss;
  ss << s;
  long long x;
  ss >> x;
  return x;
}
int main() {
  long long a1, a2, tmp, arr[20], sum, j;
  string st1;
  scanf("%lld %lld", &a2, &a1);
  st1 = tostr(a1);
  reverse(st1.begin(), st1.end());
  tmp = a2 + toint(st1);
  printf("%lld", tmp);
  return 0;
}
