#include <bits/stdc++.h>
using namespace std;
long long conversion(string p) {
  long long o;
  o = atol(p.c_str());
  return o;
}
string toString(long long h) {
  stringstream ss;
  ss << h;
  return ss.str();
}
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int lcm(int a, int b) { return (a * (b / gcd(a, b))); }
int main() {
  string a, b;
  cin >> a >> b;
  reverse(b.begin(), b.end());
  long long x = conversion(a), y = conversion(b);
  cout << x + y << endl;
}
