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:
abc = {1:'Washington',
2:'Adams',
3:'Jefferson',
4:'Madison',
5:'Monroe',
6:'Adams',
7:'Jackson',
8:'Van Buren',
9:'Harrison',
10:'Tyler',
11:'Polk',
12:'Taylor',
13:'Fillmore',
14:'Pierce',
15:'Buchanan',
16:'Lincoln',
17:'Johnson',
18:'Grant',
19:'Hayes',
20:'Garfield',
21:'Arthur',
22:'Cleveland',
23:'Harrison',
24:'Cleveland',
25:'McKinley',
26:'Roosevelt',
27:'Taft',
28:'Wilson',
29:'Harding',
30:'Coolidge',
31:'Hoover',
32:'Roosevelt',
33:'Truman',
34:'Eisenhower',
35:'Kennedy',
36:'Johnson',
37:'Nixon',
38:'Ford',
39:'Carter',
40:'Reagan'}
print abc[input()]