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:
a = int(input())
if (a == 3):
    print ("13")
elif (a == 0):
    print ("15")
elif (a == 1):
    print ("14")
elif (a == 2): 
    print ("12")
elif (a == 4):
    print ("8")
elif (a == 5):
    print ("9")
elif (a == 6):
    print ("10")
elif (a == 7):
    print ("11")
elif (a == 8):
    print ("0")
elif (a == 9):
    print ("1")
elif (a == 10):
    print ("2")
elif (a == 11):
    print ("3")
elif (a == 12):
    print ("4")
elif (a == 13):
    print ("5")
elif (a == 14):
    print ("6")
elif (a == 15):
    print ("7")