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

Solution:
presidents = ["Obama" , "Bush" , "Clinton" , "Bush" , "Reagan" , "Carter" , "Ford" , "Nixon" , "Johnson" , "Kennedy" , "Eisenhower", "Truman" , "Roosevelt" , "Hoover" , "Coolidge" , "Harding" , "Wilson" , "Taft" , "Roosevelt" , "McKinley" , "Cleveland" , "Harrison" , "Cleveland" , "Arthur" , "Garfield" , "Hayes" , "Grant" , "Johnson" , "Lincoln" , "Buchanan" , "Pierce" , "Fillmore", "Taylor" , "Polk" , "Tyler" , "Harrison" , "Van Buren" , "Jackson" , "Adams" , "Monroe" , "Madison" , "Jefferson" , "Adams" , "Washington"]
presidents = presidents[::-1]
print(presidents[int(input())-1])