Problem: <image>

Input

The input contains two integers a1, a2 (0 ≤ ai ≤ 32), separated by a single space.

Output

Output a single integer.

Examples

Input

1 1


Output

0


Input

3 7


Output

0


Input

13 10


Output

1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
int main() {
  long int p, q, x, n = 0, r;
  scanf("%ld", &p);
  scanf("%ld", &q);
  int fact = 10;
  while (q) {
    if (q == 0) break;
    x = q % 10;
    n = n * fact + x;
    q /= 10;
  }
  r = p + n;
  printf("%ld", r);
  return 0;
}