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 swap_bits(n, i, j):
    # print(bin(n))
    bit1 = (n >> i) & 1
    # print(bin(bit1))
    bit2 = (n >> j) & 1
    # print(bin(bit2))
    x = bit1 ^ bit2
    # print(bin(x))
    x = (x << i) | (x << j)
    # print(bin(x))
    res = n ^ x
    # print(bin(res))
    return res

if __name__ == '__main__':
    n = int(input())
    print(swap_bits(swap_bits(n, 0, 4), 2, 3))