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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main implements Runnable {

	String[] ans = { "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 {
		out.println(ans[nextInt() - 1]);
	}

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}

	String next() throws IOException {
		while (!st.hasMoreTokens()) {
			String line = in.readLine();
			if (line == null)
				return null;
			eat(line);
		}
		return st.nextToken();
	}

	public static void main(String[] args) {
		new Thread(null, new Main(), "Main", 1 << 28).start();
	}

	private BufferedReader in;
	private PrintWriter out;
	private StringTokenizer st;

	@Override
	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			eat("");
			solve();
			in.close();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	private void eat(String s) {
		st = new StringTokenizer(s);
	}

}