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:
def decimalToBinary(n):  
    return bin(n).replace("0b", "")  
    
def binaryToDecimal(n): 
    num = n; 
    dec_value = 0; 
    base1 = 1; 
      
    len1 = len(num); 
    for i in range(len1 - 1, -1, -1): 
        if (num[i] == '1'):      
            dec_value += base1; 
        base1 = base1 * 2; 
      
    return dec_value; 
    
n=int(input())
s=(decimalToBinary(n))
z=6-len(s)
s='0'*z+s
s=list(s)
t=s[5]
s[5]=s[1]
s[1]=t
t=s[2]
s[2]=s[3]
s[3]=t
print(binaryToDecimal(s))