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>
using namespace std;
int fastpow(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) ans = ans * a;
  return ans;
}
int num;
int main() {
  int n;
  scanf("%d", &n);
  string a;
  cin >> a;
  for (int i = 0; i < a.length(); i++) n += (a[i] - '0') * fastpow(10, i);
  printf("%d", n);
  return 0;
}