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="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/Bush/Obama"
a=s.split('/')
n=input()-1
t=a[n]
print t.split('.')[-1]