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:
s = """
1. George Washington
2. John Adams
3. Thomas Jefferson
4. James Madison
5. James Monroe
6. John Quincy Adams
7. Andrew Jackson
8. Martin Van Buren
9. William Henry Harrison
10. John Tyler
11. James Knox Polk
12. Zachary Taylor
13. Millard Fillmore
14. Franklin Pierce
15. James Buchanan
16. Abraham Lincoln
17. Andrew Johnson
18. Ulysses S. Grant
19. Rutherford B. Hayes
20. James Garfield
21. Chester Arthur
22. Grover Cleveland
23. Benjamin Harrison
24. Grover Cleveland
25. William McKinley
26. Theodore Roosevelt
27. William Howard Taft
28. Woodrow Wilson
29. Warren Harding
30. Calvin Coolidge
31. Herbert Hoover
32. Franklin D. Roosevelt
33. Harry S Truman
34. Dwight D. Eisenhower
35. John F. Kennedy
36. Lyndon Johnson
37. Richard Nixon
38. Gerald Ford
39. James Carter
40. Ronald Reagan
41. George H. W. Bush
42. William J. Clinton
43. George W. Bush
44. Barack H. Obama
"""

s = s.split('\n')

n = int(raw_input())

if n == 8:
    print 'Van Buren'
else:
    t = s[n].split()
    print t[-1]

    # if len(t) == 3:
    #     print t[-1]
    # elif len(t) == 4:
    #     if len(t[-2]) in (1, 2):
    #         print t[-1]
    #     else:
    #         print t[-2] + ' ' + t[-1]