#include <bits/stdc++.h>
using namespace std;
template <class T>
string tostring(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
template <class T>
int toint(T s) {
  int v;
  istringstream sin(tostring(s));
  sin >> v;
  return v;
}
vector<string> split(string sentence) {
  istringstream iss(sentence);
  vector<string> tokens;
  copy(istream_iterator<string>(iss), istream_iterator<string>(),
       back_inserter<vector<string> >(tokens));
  return tokens;
}
string a, b;
bool OK() {
  if (a.size() != b.size()) return false;
  int r, y, suma;
  r = -1;
  y = -1;
  for (int i = suma = 0; a[i]; i++) {
    if (a[i] != b[i]) {
      suma++;
      if (r < 0)
        r = i;
      else
        y = i;
    }
  }
  if (suma != 2) return false;
  if (a[r] == b[y] && b[r] == a[y]) return true;
  return false;
}
int main() {
  string x, y;
  cin >> x >> y;
  string tekst = string(y.rbegin(), y.rend());
  cout << toint(x) + toint(tekst);
  return 0;
}
