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())

s = ''

for i in range(6):
    s+= str(n%2)
    n=n//2
s = s[::-1]
s=list(s)
temp = s[1]
s[1] = s[5]
s[5] = temp

temp = s[2]
s[2] = s[3]
s[3] = temp


p = 2**5 * int(s[0]) + 2**4 * int(s[1]) + 2**3 * int(s[2]) + 2**2 * int(s[3]) + 2**1 * int(s[4]) + 2**0 * int(s[5])
   
    
print(p)