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:
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		String s = Integer.toBinaryString(n);
		
		char[] arr = new char[6];
		
		for(int i=0;i<6;i++)
		arr[i]='0';
		
		int j = s.length()-1;
		
		for(int i=5;i>=0;i--){
			arr[i] = s.charAt(j);
			j--;
			if(j<0)
			break;
		}
		
		String r = "";
		r+=arr[0];
		r+=arr[5];
		r+=arr[3];
		r+=arr[2];
		r+=arr[4];
		r+=arr[1];
		
		int ans = Integer.parseInt(r,2);
		System.out.print(ans);
	}
}