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