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 JAVA):

Solution:
import java.text.DecimalFormat;
import java.util.*;
public class Main{
	public static boolean isN(int x) {
		String str="";
		for(int i=5;i>=0;i--)
		{
			if(((x>>i)&1)==1)
		   str=str+"1";
			else
		   str=str+"0";
		}
//		System.out.println(str);
		String str1=str.charAt(0)+""+str.charAt(5)+""+str.charAt(3)+""+str.charAt(2)+""+str.charAt(4)+""+str.charAt(1);
//		System.out.println(str1);
		int k=1;
		int ans=0;
		for(int i=str1.length()-1;i>=0;i--)
		{
			if(str1.charAt(i)=='1') {
			ans=ans+k;
//			System.out.println(i);
			}
			k=k*2;
		}
		System.out.println(ans);
		return true;
	}
	public static void main(String[] args) {
		Scanner sc =new Scanner(System.in); 
       int n=sc.nextInt();
		isN(n);
        
	}
}