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())

s=bin(n)[2:]
l=len(s)
s="0"*(7-l)+s
# print(s)
x=["*"]*7
x[1]=s[1]
x[2]=s[6]
x[3]=s[4]
x[4]=s[3]
x[5]=s[5]
x[6]=s[2]
f=''.join(i for i in x)[1:]
print(int(f,2))