Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in PYTHON):

Solution:
lst = " Washington / J.Adams / Jefferson / Madison / Monroe / J.Q.Adams / Jackson / Van Buren / W.H.Harrison / Tyler / Polk / Taylor / Fillmore / Pierce / Buchanan / Lincoln / A.Johnson / Grant / Hayes / Garfield / Arthur / Cleveland / B.Harrison / Cleveland / McKinley / T.Roosevelt / Taft / Wilson / Harding / Coolidge / Hoover / F.Roosevelt / Truman / Eisenhower / Kennedy / L.Johnson / Nixon / Ford / Carter / Reagan / Bush / Clinton "
n = int(raw_input())
lst = lst.split('/')
c = lst[n-1]
c = c.split('.')[-1].strip()
print c