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:
"""
CONTESTANT: ngtien2
CONTEST: April Fools Day Contest 2020
LANGUAGE: Python 3.7
PROBLEM: C. ...And after happily lived ever they
"""


# Swap '543210' to '502314'
def swap(n):
    result = 0
    for index, bit in enumerate([4, 1, 3, 2, 0, 5]):
        result += bool(n & (1 << bit)) * 2 ** index
    return result


n = int(input())
print(swap(n))