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:
a = int(raw_input())
c = []
for i in xrange(15):
    c.append(a & 1)
    a >>= 1
#print c
t = c[0]
c[0] = c[4]
c[4] = t
t = c[2]
c[2] = c[3]
c[3] = t
#print c
x = 0
y = 1
for i in c:
    x |= i * y
    y <<= 1
print x