#include <bits/stdc++.h>
using namespace std;
template <class T>
int len(const T& c) {
  return (int)c.size();
}
string itoa(long long a) {
  if (a == 0) return "0";
  string ret;
  for (long long i = a; i > 0; i = i / 10) ret.push_back((i % 10) + 48);
  reverse(ret.begin(), ret.end());
  return ret;
}
long long toint(string s) {
  long long r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
int main() {
  long long n, m;
  string s1, s2, s3, s4;
  cin >> n >> m;
  s1 = itoa(n);
  s2 = itoa(m);
  reverse(s2.begin(), s2.end());
  cout << toint(s1) + toint(s2);
}
