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 PYTHON):

Solution:
r,c=map(int,raw_input().split())
print (0x1fd57ca7f82005620dd360d176eac9f4bb758c795d82aad0a0ff55555fc03ef9e011790bdf9dcff211639d0a3a29e18fd607fffc7258e174d35255165aa0ac151f40014668f5aa4fbc5475bf890e2026260d046d3724d875a23d537533a683b14af17f04770adf000e5a28b7f45e356a09d5f237752851f8ba3497ed5d237b5c20999f3c1fda29b91L>>(33*33-1-r*33-c))&1