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.io.PrintWriter;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);

		int n = in.nextInt();
		int m = n;

		m = transformBit(n, m, 0, 4);
		m = transformBit(n, m, 2, 3);
		m = transformBit(n, m, 3, 2);
		m = transformBit(n, m, 4, 0);

		out.println(m);
		out.flush();
	}

	private static int transformBit(int n, int m, int fromIndex, int toIndex) {
		if ((n >> fromIndex) % 2 == 0) {
			m = m & ~(1 << toIndex);
		} else {
			m = m | (1 << toIndex);
		}
		return m;
	}
}