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:
import bisect, collections
 
 
 
def solution():
    
    n = int(input().strip())
    n = bin(n).split("b")[1]
    n = "0"*(6-len(n))+n
    tmp = 0
    tmp += 2**5 if n[0] == "1" else 0
    tmp += 2**4 if n[5] == "1" else 0
    tmp += 2**3 if n[3] == "1" else 0
    tmp += 2**2 if n[2] == "1" else 0
    tmp += 2**1 if n[4] == "1" else 0
    tmp += 2**0 if n[1] == "1" else 0
    print(tmp)
    
    


    

def main():    
    # T = int(input().strip())
    for _ in range(1):
        solution()

if __name__ == "__main__":
    main()