1331_C. ...And after happily lived ever they


Input

The input contains a single integer a (0 ≤ a ≤ 63).

Output

Output a single number.

Examples

Input


2


Output


2


Input


5


Output


24


Input


35


Output


50
```python
# And after happily lived ever they

n = int(input())
d = [0,5,3,2,4,1]

r=0
for dd in d:
    r=r*2 + bool(n&1<<(5-dd))

print (r)
```