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:
#!/usr/bin/env python3

def main():
	n = input()
	b = str(bin(n))
	s = len(b)
	zeros = ""

	for i in range((8-s)):
		zeros += "0"

	c = b[:2] + zeros + b[2:]
	d = "0b" + c[2:3] + c[7:8] + c[5:6] + c[4:5] + c[6:7] + c[3:4]
	ans = int(d, 2)
	print(ans)

if __name__ == "__main__":
    main()