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 PYTHON):

Solution:
def getBit(val):
    ret = []
    for _ in xrange(6):
        ret.append(val % 2)
        val /= 2
    return ret

def getVal(bits):
    ret = 0
    tmp = 1
    for bit in bits:
        ret += tmp * bit
        tmp *= 2
    return ret

val = int(raw_input(''))
bits = getBit(val)
# print bits

bits[2], bits[3] = bits[3], bits[2]
bits[0], bits[4] = bits[4], bits[0]
print getVal(bits)