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:
def decimalToBinary(num):
    string = ""
    while num > 0:
        string += str(num % 2)
        num //= 2
    return string[::-1]

def binaryToDecimal(string):
    ans = 0
    current_exp = 0
    new = string[::-1]
    for char in new:
        if char == "1":
            ans += pow(2,current_exp)
        current_exp+=1
    return ans



x = int(input())

ans = decimalToBinary(x)
ans =  ("0"* (6-len(ans))) + ans
new =  ans[0] + ans[5] + ans[3] + ans[2] + ans[4] + ans[1]
print(binaryToDecimal(new))