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.Scanner;

public class Solution1{
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int a = input.nextInt();
		String bin_str = Integer.toBinaryString(a);
		while(bin_str.length() != 6){
			bin_str = "0" + bin_str;
		}
		String out = "";
		out += bin_str.charAt(0);
		out += bin_str.charAt(5);
		out += bin_str.charAt(3);
		out += bin_str.charAt(2);
		out += bin_str.charAt(4);
		out += bin_str.charAt(1);
		// System.out.println(out);
		System.out.println(solve(out));

	}
	public static String solve(String s){
		int a = 0;
		int max = 5;
		for(int i = 0; i < s.length(); i++){
			if(s.charAt(i) == '1'){
				a += Math.pow(2, max);
			}
			max--;
		}
		return a+"";
	}

}