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 binary(x):
    if(x==0):
        return ""
    if(x%2==0):
        return binary(x//2)+"0"
    else:
        return binary(x//2)+"1"


def decimal(x):
    tot = 0
    for i in x:
        tot = tot*2
        if(i!='0'):
            tot+=1
    return tot

    
x = int(input())
strx = binary(x)
n = len(strx)
tot = abs(6-n)
strx = ('0'*tot)+strx

newx = strx[0]+strx[5]+strx[3]+strx[2]+strx[4]+strx[1]

val = decimal(newx)

print(val)