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:
s = int(input())
a = []
while(s>0):
    a = a + [s%2]
    s = int(s/2)
l = len(a)
while(l<6):
    a.append(0)
    l+=1
temp = a[0]
a[0]=a[4]
a[4]=temp
temp=a[2]
a[2]=a[3]
a[3]=temp
d = 0
count = 1
for i in a:
    d += i*count
    count*=2
print(d)