#include <bits/stdc++.h>
int pow1(int k) {
  int s = 1;
  while (k--) s *= 10;
  return s;
}
int main() {
  int n, m;
  int i;
  int count = 0;
  int a[15] = {0};
  scanf("%d%d", &n, &m);
  while (m > 0) {
    a[count++] = m % 10;
    m /= 10;
  }
  int tmp = 0;
  for (i = 0; i < count; i++) tmp += a[i] * pow1(count - 1 - i);
  printf("%d\n", n + tmp);
  return 0;
}
