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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr  2 00:03:10 2020

@author: maruf
"""

n=int(input())

num=bin(n).replace("0b", "")
num2=[]
num_list=list(num)
t=0
while(t<(6-len(num_list))):
    num2.append("0")
    t+=1
num2=num2+num_list
#print("".join(num2))  
'''
num_2=num2[1]
num_6=num2[-1]
num_3=num2[2] 
num_4=num2[3]
num2[1]=num_6
num2[-1]=num_2
num2[2]=num_4
num2[3]=num_2
'''
original_number=str("".join([num2[0],num2[5],num2[3],num2[2],num2[4],num2[1]]))
print(int(original_number,2))