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:
all_res = []


def find(a):
    # a = int(input())

    bin_code = [0] * 6

    for i in range(6):
        bin_code[5 - i] = a % 2
        a = a // 2


    res = [bin_code[0], bin_code[5], bin_code[3], bin_code[2], bin_code[4], bin_code[1]]

    result = 0

    for i in range(6):
        result += res[i] * 2 ** (5 - i)
    # all_res.append(result)
    print(result)


# for i in range(64):
#     find(i)
#
# all_res.sort()
# print(all_res)

a = int(input())
find(a)