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

public class Solurion {

	String[] names = {
			"George Washington",
			"John Adams",
			"Thomas Jefferson",
			"James Madison",
			"James Monroe",
			"John Adams",
			"Andrew Jackson",
			"Martin Van Buren",
			"William Harrison",
			"John Tyler",
			"James Polk",
			"Zachary Taylor",
			"Millard Fillmore",
			"Franklin Pierce",
			"James Buchanan",
			"Abraham Lincoln",
			"Andrew Johnson",
			"Ulysses Grant",
			"Rutherford Hayes",
			"James Garfield",
			"Chester Arthur",
			"Grover Cleveland",
			"Benjamin Harrison",
			"Grover Cleveland",
			"William McKinley",
			"Theodore Roosevelt",
			"William Taft",
			"Woodrow Wilson",
			"Warren Harding",
			"Calvin Coolidge",
			"Herbert Hoover",
			"Franklin Roosevelt",
			"Harry S. Truman",
			"Dwight Eisenhower",
			"John Kennedy",
			"Lyndon Johnson",
			"Richard Nixon",
			"Gerald Ford",
			"James Carter",
			"Ronald Reagan",

	};
	
	private void solve() throws Exception {
		int a = nextInt() - 1;
		String cur = names[a];
		String[] tokens = cur.split(" ");
		String ans = "";
		for (int i = 1; i < tokens.length; ++i) {
			if (ans.length() > 0) {
				ans += " ";
			}
			if (!tokens[i].contains(".")) {
				ans += tokens[i];
			}
		}
		out.println(ans);
		/*for (int i = 0; i < 40; ++i) {
			String line = in.readLine();
			System.out.println(line);
			String[] tokens = line.split(",");
			out.print("\"");
			out.print(tokens[0]);
			out.println("\",");
		}*/
	}

	public void run() {
		try {
			solve();
		} catch (Exception e) {
			NOO(e);
		} finally {
			out.close();
		}
	}

	PrintWriter out;
	BufferedReader in;
	StringTokenizer St;

	void NOO(Exception e) {
		e.printStackTrace();
		System.exit(42);
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	String nextToken() {
		while (!St.hasMoreTokens()) {
			try {
				String line = in.readLine();
				if (line == null)
					return null;
				St = new StringTokenizer(line);
			} catch (Exception e) {
				NOO(e);
			}
		}
		return St.nextToken();
	}

	private Solurion(String name) {
		try {
			in = new BufferedReader(new FileReader("input.txt"));
			St = new StringTokenizer("");
			out = new PrintWriter(new FileWriter("output.txt"));
		} catch (Exception e) {
			NOO(e);
		}
	}

	private Solurion() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			St = new StringTokenizer("");
			out = new PrintWriter(System.out);
		} catch (Exception e) {
			NOO(e);
		}
	}

	public static void main(String[] args) {
		//Locale.setDefault(Locale.US);
		new Solurion().run();
	}
}