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:
n = int(input())

arr = [15, 14, 12, 13, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5, 6, 7]

print(arr[n])
exit(0)
if n == 0:
    print(15)
    exit(0)

if n == 1:
    print(14)
    exit(0)

if n == 2:
    print(12)
    exit(0)

if n == 3:
    print(13)
    exit(0)

if n == 4:
    print(8)
    exit(0)

if n == 5:
    print(9)
    exit(0)

if n == 6:
    print(10)
    exit(0)

if n == 7:
    print(11)
    exit(0)

exit(228)
n = n ^ ((n & 1) << 1) 

n = n ^ ((n & 1) << 1)
n = n ^ ((n & 2) << 1) 

n = n ^ ((n & 1) << 1)
n = n ^ ((n & 2) << 1)
n = n ^ ((n & 4) << 1)   

#n = n ^ ((n & 4) << 1) ^ ((n & 2) << 2) ^ ((n & 1) << 3)

print(n)



#0011 -> 0001 -> 0101 -> 0101