Problem: 

Input

The input contains a single integer a (1 ≤ a ≤ 40).

Output

Output a single string.

Examples

Input

2


Output

Adams


Input

8


Output

Van Buren


Input

29


Output

Harding

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Scanner;
import java.util.StringTokenizer;

public class A {
	BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
	StringTokenizer st = null;

	private void solution() throws IOException {
		int n = nextInt();
		String a[] = new String[41];
		a[1] = "Washington";
		a[2] = "Adams";
		a[3] = "Jefferson";
		a[4] = "Madison";
		a[5] = "Monroe";
		a[6] = "Adams"; // 2
		a[7] = "Jackson";
		a[8] = "Van Buren";
		a[9] = "Harrison"; // 1
		a[10] = "Tyler";
		a[11] = "Polk";
		a[12] = "Taylor";
		a[13] = "Fillmore";
		a[14] = "Pierce";
		a[15] = "Buchanan";
		a[16] = "Lincoln";
		a[17] = "Johnson";
		a[18] = "Grant";
		a[19] = "Hayes";
		a[20] = "Garfield";
		a[21] = "Arthur";
		a[22] = "Cleveland";
		a[23] = "Harrison";
		a[24] = "Cleveland";
		a[25] = "McKinley";
		a[26] = "Roosevelt";
		a[27] = "Taft";
		a[28] = "Wilson";
		a[29] = "Harding";
		a[30] = "Coolidge";
		a[31] = "Hoover";
		a[32] = "Roosevelt";
		a[33] = "Truman";
		a[34] = "Eisenhower";
		a[35] = "Kennedy";
		a[36] = "Johnson";
		a[37] = "Nixon";
		a[38] = "Ford";
		a[39] = "Carter";
		a[40] = "Reagan";
		System.out.println(a[n]);

	}

	String nextToken() throws IOException {
		if (st == null || !st.hasMoreTokens()) {
			st = new StringTokenizer(bf.readLine());
		}
		return st.nextToken();
	}

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

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

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

	public void print(int a[]) {
		for (int i = 0; i < a.length; i++) {
			System.out.print(a[i] + " ");
		}
	}

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