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

	public static void main(String[] args) {
		Scanner file = new Scanner(System.in);
		int num = file.nextInt();
		int result = 0;
		int[] transpose = {4, 1, 3, 2, 0, 5};
		for(int i = 0; i < transpose.length; i++) {
			if((num&1<<transpose[i]) == 1<<transpose[i]) {
				result += 1<<i;
			}
		}
		System.out.println(result);
		file.close();
	}

}