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 Order {
	
	public static int[] convertBinary(int num){
	    int binary[] = new int [6];
	    int index = 5;
	    while(num > 0){
	      binary[index--] = num%2;
	      num = num/2;
	    }
	    return binary;
	}
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int x = scan.nextInt();
		int[] xBi = convertBinary(x);
		int[] order = new int[6];
		order[0] = xBi[0];
		order[1] = xBi[5];
		order[2] = xBi[3];
		order[3] = xBi[2];
		order[4] = xBi[4];
		order[5] = xBi[1];
		int out = 0;
		for(int i = 0; i < xBi.length; i++) {
			out += order[order.length-i-1] * Math.pow(2, i);
		}
		System.out.println(out);
	}
}