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):  
    a = bin(n).replace("0b", "")
    o =Ans(a)
    return o

def Ans(a):
	if(len(a)<6):
		b = a[::-1]
		t = Ques(b)
		t = t[::-1]
	else:
		t = a
	e = Was(t)
	return e
def Ques(b):
	x = len(b)
	while(len(b)<6):
		b = b + "0"
		x+=1
	return b

def Was(t):
	s =""
	s = s+ t[0] +t[5] + t[3] + t[2] + t[4] + t[1]
	return s
def Dec(n): 
    num = n; 
    dec_value = 0; 
      
    # Initializing base  
    # value to 1, i.e 2 ^ 0 
    base = 1; 
      
    temp = num; 
    while(temp): 
        last_digit = temp % 10; 
        temp = int(temp / 10); 
          
        dec_value += last_digit * base; 
        base = base * 2; 
    return dec_value; 

n = int(input())
x = int(decimalToBinary(n))
print (Dec(x))