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 x, y, A[100], k = 0, B[100], i;
int us(int x, int y) {
  if (y == 0) return 1;
  if (y == 1) {
    return x;
  } else
    return us(x, y - 1) * x;
}
int main() {
  scanf("%d %d", &x, &y);
  while (y) {
    k++;
    A[k] = y % 10;
    y = y / 10;
  }
  for (i = 1; i <= k; i++) {
    B[i] = A[k - i + 1];
  }
  y = 0;
  for (i = 1; i <= k; i++) {
    y = y + A[i] * us(10, k - i);
  }
  printf("%d", y + x);
  return 0;
}