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:
n = int(input())
b = list(bin(n)[2:])
x = ["0"]*(6-len(b))
x.extend(b)
y = (int(x[0])*32)+(int(x[5])*16)+(int(x[3])*8)+(int(x[2])*4)+(int(x[4])*2)+(int(x[1]))
print(y)