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:
u=0
x=bin(int(input()))[2:]
while len(x) !=6:
  x=str(x)
  x='0'+x
if x[0]=='1':
  u+=32
if x[1]=='1':
  u+=1
if x[2]=='1':
  u+=4
if x[3]=='1':
  u+=8
if x[4]=='1':
  u+=2
if x[5]=='1':
  u+=16
print(u)