#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  string s;
  cin >> n >> s;
  for (long long i = 0; i < s.size(); i++) {
    long long a = pow(10, i);
    n += (a * (s[i] - '0'));
  }
  cout << n;
  return 0;
}
