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;
long long c[33] = {
    8533824895LL, 4369023041LL, 6246905437LL, 6253595997LL, 6261859165LL,
    4379596097LL, 8545195391LL, 31973120LL,   5359932369LL, 1753546555LL,
    2732754382LL, 6470747678LL, 882671615LL,  1254829703LL, 2192389205LL,
    12462605LL,   3051539536LL, 3802390309LL, 595890157LL,  2193723792LL,
    910809452LL,  3401336238LL, 3769820759LL, 1067701411LL, 527048132LL,
    3511002880LL, 3043217791LL, 7268642369LL, 1058285917LL, 3085511773LL,
    493838941LL,  255747649LL,  4625435519LL};
int main() {
  int a, b;
  cin >> a >> b;
  cout << (c[a] >> b) % 2 << endl;
  return 0;
}