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


public class Main {
	static BufferedReader in;
	static PrintWriter out;
	static StringTokenizer tok;
	
	final static double EPS = 1e-7;
	final static long MOD = 1000000007;
	
	static	String[] res = {
		"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",
	};
	
	static void solve() throws Exception {
		int a = nextInt();
		out.println(res[a-1]);
	}
	
	static int sqr(int x) {
		return x*x;
	}
	
	static int nextInt() throws IOException {
		return Integer.parseInt(next());
	}

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

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

	static BigInteger nextBigInteger() throws IOException {
		return new BigInteger(next());
	}
	
	static String next() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}
	
	static String nextLine() throws IOException {
		tok = new StringTokenizer("");
		return in.readLine();
	}

	static boolean hasNext() throws IOException {
		while (tok == null || !tok.hasMoreTokens()) {
			String s = in.readLine();
			if (s == null) {
				return false;
			}
			tok = new StringTokenizer(s);
		}
		return true;
	}

	public static void main(String args[]) {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(new OutputStreamWriter(System.out));
			//in = new BufferedReader(new FileReader("input.in"));
			//out = new PrintWriter(new FileWriter("output.out"));
			solve();
			in.close();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			java.lang.System.exit(1);
		}
	}
}