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 A implements Runnable {

	String[] ans = { "Lol", "Washington", "Adams", "Jefferson", "Madison",
			"Monroe", "Adams", "Jackson", "Van Buren", "Harrison", "Tyler",
			"Polk", "Taylor", "Fillmore", "Pierce", "Buchanan", "Lincoln",
			"Johnson", "Grant", "Hayes", "Garfield", "Arthur", "Cleveland",
			"Harrison", "Cleveland", "McKinley", "Roosevelt", "Taft", "Wilson",
			"Harding", "Coolidge", "Hoover", "Roosevelt", "Truman",
			"Eisenhower", "Kennedy", "Johnson", "Nixon", "Ford", "Carter",
			"Reagan" };

	private void solve() throws IOException {
		int a = nextInt();
		System.out.println(ans[a]);
	}

	public static void main(String[] args) {
		new A().run();
	}

	BufferedReader reader;
	StringTokenizer tokenizer;
	PrintWriter writer;

	public void run() {
		try {
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(System.out);
			solve();
			writer.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(261);
		}
	}

	void halt() {
		writer.close();
		System.exit(0);
	}

	void print(Object... objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	void println(Object... objects) {
		print(objects);
		writer.println();
	}

	String nextLine() throws IOException {
		return reader.readLine();
	}

	String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(nextLine());
		return tokenizer.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}
}