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())
x=0
for i in range(n):
    s=input()
    if s=='++X':
        x+=1
    else:
        x-=1
print(x)
'''
'''
n=int(input())
l=list(map(int,input().split()))
c=0
for i in range(1,n,1):
    if l[i-1]<=l[i]:
        c+=1
print(c)
'''
n=int(input())
if n%2==0:
    print(0)
else:
    print(1)