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:
s = bin(int(input()))[2:]
while len(s) < 6:
    s = "0" + s

x = "0b"
x += s[0]
x += s[5]
x += s[3]
x += s[2]
x += s[4]
x += s[1]
print(int(x, 2))