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) {
		new C();
	}

	public C() {
		Scanner sc = new Scanner(System.in);

		int val = sc.nextInt();
		int a = (val >> 5) & 1;
		int b = (val >> 4) & 1;
		int c = (val >> 3) & 1;
		int d = (val >> 2) & 1;
		int e = (val >> 1) & 1;
		int f = val & 1;
		int result = 0;
		result += (a << 5);
		result += (f << 4);
		result += (d << 3);
		result += (c << 2);
		result += (e << 1);
		result += b;
		System.out.println(result);

		sc.close();
	}
}