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(binary): 
    binary1 = binary 
    decimal, i, n = 0, 0, 0
    while(binary != 0): 
        dec = binary % 10
        decimal = decimal + dec * pow(2, i) 
        binary = binary//10
        i += 1
    print(decimal)

n=int(input())
p=bin(n)[2:]
str=("000000"+str(p))[-6:]
l=list(str)
a,b,c,d=l[1],l[2],l[3],l[5]
ns=l[0]+d+c+b+l[4]+a
binaryToDecimal(int(ns))