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:
num = int(input())
binary = bin(num).replace("0b", "")
binary = str(binary)
while(len(binary) < 6):
    binary = "0" + binary
binary = [char for char in binary]
tmp = binary[1]
binary[1] = binary[5]
binary[5] = tmp
tmp = binary[2]
binary[2] = binary[3]
binary[3] = tmp
string = ""
binary = string.join(binary)
print(int(binary,2))