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 binaryToDecimal(n): 
    return int(n,2) 


n = int(input())
# 164352
x=str(bin(n))[2:]

if len(x)<6:
    diff=6-len(x)
    temp=''
    for i in range(diff):
        temp+='0'
    x=temp+x

gg=x[0]+x[5]+x[3]+x[2]+x[4]+x[1]

print(binaryToDecimal(gg))