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:
a = str(bin(int(input())).replace("0b", ""))
while len(a) != 6:
     a = "0" + a
b = [0]*6
if a[0] == "1":
     b[0] = 1
if a[1] == "1":
     b[5] = 1
if a[2] == "1":
     b[3] = 1
if a[3] == "1":
     b[2] = 1
if a[4] == "1":
     b[4] = 1
if a[5] == "1":
     b[1] = 1
a = ""
for i in b:
     a = a+str(i)

print(int(a, 2))