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 bitmask {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		int num = Integer.parseInt(in.readLine());
		int o = 0;
		int[] nums = new int[6];
		for(int i=0; i<nums.length; i++) {
			nums[i]=(num>>i)&1;
		}
		int[] place = new int[6];
		place[5]=nums[5];
		place[0]=nums[4];
		place[4]=nums[0];
		place[3]=nums[2];
		place[2]=nums[3];
		place[1]=nums[1];
		for(int i=0; i<place.length; i++) {
			o+=place[i]<<i;
		}
		System.out.println(o);
		in.close();
		out.close();
	}

}