#include <bits/stdc++.h>
using namespace std;
const double PI = 2 * asin(1.0);
const int INF = 1000000000;
const double EPS = 1e-10;
inline int cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
inline long long gcd(long long n1, long long n2) {
  return n2 == 0 ? abs(n1) : gcd(n2, n1 % n2);
}
inline long long lcm(long long n1, long long n2) {
  return n1 == 0 || n2 == 0 ? 0 : abs(n1 * (n2 / gcd(n1, n2)));
}
map<int, int> mapi;
bool comp(pair<int, int> p1, pair<int, int> p2) {
  return p1.second > p2.second;
}
class mycomparison {
  bool reverse;

 public:
  mycomparison(const bool& revparam = false) { reverse = revparam; }
  bool operator()(const pair<int, int>& lhs, const pair<int, int>& rhs) const {
    if (reverse)
      return (lhs.second < rhs.second);
    else
      return (lhs.second > rhs.second);
  }
};
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  long long res = 0;
  long long dez = 1;
  for (int i = 0; i < int((str2).size()); ++i) {
    res += (str2[i] - '0') * dez;
    dez *= 10;
  }
  dez = 1;
  for (int i = 0; i < int((str1).size()); ++i) {
    res += (str1[int((str1).size()) - 1 - i] - '0') * dez;
    dez *= 10;
  }
  cout << res << endl;
}
