#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
mt19937 rnd(time(0));
template <class T>
long long upmax(T &a, T b) {
  return (b > a) ? a = b, 1 : 0;
}
template <class T>
long long upmin(T &a, T b) {
  return (b < a) ? a = b, 1 : 0;
}
const long long INF = 1e9;
constexpr long long mod = 1e9 + 7;
void solve() {
  string a, b;
  cin >> a >> b;
  reverse(b.begin(), b.end());
  long long A = stoi(a), B = stoi(b);
  cout << A + B << '\n';
}
signed main() {
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
