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.*;
import java.util.*;

public class CF1331C extends PrintWriter {
	CF1331C() { super(System.out, true); }
	Scanner sc = new Scanner(System.in);
	public static void main(String[] $) {
		CF1331C o = new CF1331C(); o.main(); o.flush();
	}

	int[] pp = { 4, 1, 3, 2, 0, 5 };
	void main() {
		int a = sc.nextInt();
		int b = 0;
		for (int i = 0; i < 6; i++)
			if ((a & 1 << i) != 0)
				b |= 1 << pp[i];
		println(b);
	}
}