#include <bits/stdc++.h>
using namespace std;
int size(long long a) {
  int c = 0;
  while (a != 0) {
    c++;
    a /= 10;
  }
  return c;
}
int main() {
  long long a, b, c;
  cin >> a >> b;
  long long s = size(b), ns = 1;
  for (int i = 1; i <= s; i++) ns *= 10;
  s = ns;
  while (b != 0) {
    long long f = b % 10;
    b /= 10;
    s /= 10;
    a += s * f;
  }
  cout << a;
  return 0;
}
