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 PYTHON):

Solution:
R = lambda t = int: t(raw_input())
RL = lambda t = int: map(t, raw_input().split())
RLL = lambda n, t = int: [map(t, raw_input().split()) for _ in range(n)]

n = R()
r = 0
for i in [1,6,4,3,5,2]:
  i = 6-i
  r = r * 2
  r += (n >> i) & 1
print r

# And after happily lived ever they
#   1   6     4     3      5     2
# and they lived happily ever after