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:
a=input()-1
d=a%6
c=a/6
if c==0:
    b=["Washington","Adams","Jefferson","Madison","Monroe","Adams"]
elif c==1:
    b=["Jackson","Van Buren","Harrison","Tyler","Polk","Taylor"]
elif c==2:
    b=["Fillmore","Pierce","Buchanan","Lincoln","Johnson","Grant"]
elif c==3:
    b=[ "Hayes","Garfield","Arthur","Cleveland","Harrison","Cleveland"]
elif c==4:
    b=["McKinley","Roosevelt","Taft","Wilson","Harding","Coolidge"]
elif c==5:
    b=["Hoover","Roosevelt","Truman","Eisenhower","Kennedy","Johnson"]
elif c==6:
    b=["Nixon","Ford","Carter","Reagan","Bush","Clinton"]
elif c==7:
    b=["Bush","Obama"]
print b[d]