#include <bits/stdc++.h>
using namespace std;
int POW(int n) {
  int num = 1;
  for (int i = 0; i < n; i++) {
    num *= 10;
  }
  return num;
}
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int t = m, a[15], i = 0;
  while (t > 0) {
    a[i++] = t % 10;
    t /= 10;
  }
  int num = 0;
  for (int j = i - 1; j >= 0; j--) {
    n += a[num++] * POW(j);
  }
  printf("%d\n", n);
  return 0;
}
