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.util.*;
import java.io.*;
 
public class CodeForces
{
	public static void main(String[] args)throws IOException
	{
		Scanner sc=new Scanner(System.in);
		//Scanner sc=new Scanner(new File("ip.txt"));
		int n,i;
		String ss="";

		n=sc.nextInt();
		for(i=0;i<6;i++)
		{
			ss=(n%2)+ss;
			n/=2;
		}

		System.out.println(rearrange(ss));
	}
	public static int rearrange(String s)
	{
		String result=""+s.charAt(0)+s.charAt(5)+s.charAt(3)+s.charAt(2)+s.charAt(4)+s.charAt(1);
		int sum=0;
		for(int i=5;i>=0;i--)
		{
			if(result.charAt(i)=='1')
				sum=sum+(1<<(5-i));
		}
		return sum;
	}
}