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


public class T290A {

	public void solve(int a) {
		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"
		};
		System.out.println(ans[a]);
	}
	
	public static void main(String[] args) {
		FastScanner in = new FastScanner();
		new T290A().solve(in.nextInt());

	}
	static class FastScanner {

		BufferedReader br;
		StringTokenizer st;

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String nextToken() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

	}
}