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:
import sys
input = lambda: sys.stdin.readline().rstrip()

x = int(input())

y=[x&32,x&16,x&8,x&4,x&2,x&1]
for i in range(len(y)):
    if y[i]: y[i] = 1
#print(y)
#And after happily lived ever they
#And they lived happily ever after
y=[y[0],y[5],y[3],y[2],y[4],y[1]]
#print(y)
x=(y[0]<<5)+(y[1]<<4)+(y[2]<<3)+(y[3]<<2)+(y[4]<<1)+(y[5])
print(x)