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.awt.Point;
import java.io.*;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Main {

	final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
	BufferedReader in;
	PrintWriter out;
	StringTokenizer tok = new StringTokenizer("");

	void init() throws FileNotFoundException {
		if (ONLINE_JUDGE) {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
		} else {
			in = new BufferedReader(new FileReader("input.txt"));
			out = new PrintWriter("output.txt");
		}
	}

	String readString() throws IOException {
		while (!tok.hasMoreTokens()) {
			tok = new StringTokenizer(in.readLine());
		}
		return tok.nextToken();
	}

	int readInt() throws IOException {
		return Integer.parseInt(readString());
	}

	long readLong() throws IOException {
		return Long.parseLong(readString());
	}

	double readDouble() throws IOException {
		return Double.parseDouble(readString());
	}

	public static void main(String[] args) {
		new Main().run();
		// Sworn to fight and die
	}

	public static void mergeSort(int[] a) {
		mergeSort(a, 0, a.length - 1);
	}

	private static void mergeSort(int[] a, int levtIndex, int rightIndex) {
		final int MAGIC_VALUE = 50;
		if (levtIndex < rightIndex) {
			if (rightIndex - levtIndex <= MAGIC_VALUE) {
				insertionSort(a, levtIndex, rightIndex);
			} else {
				int middleIndex = (levtIndex + rightIndex) / 2;
				mergeSort(a, levtIndex, middleIndex);
				mergeSort(a, middleIndex + 1, rightIndex);
				merge(a, levtIndex, middleIndex, rightIndex);
			}
		}
	}

	private static void merge(int[] a, int levtIndex, int middleIndex,
			int rightIndex) {
		int length1 = middleIndex - levtIndex + 1;
		int length2 = rightIndex - middleIndex;
		int[] levtArray = new int[length1];
		int[] rightArray = new int[length2];
		System.arraycopy(a, levtIndex, levtArray, 0, length1);
		System.arraycopy(a, middleIndex + 1, rightArray, 0, length2);
		for (int k = levtIndex, i = 0, j = 0; k <= rightIndex; k++) {
			if (i == length1) {
				a[k] = rightArray[j++];
			} else if (j == length2) {
				a[k] = levtArray[i++];
			} else {
				a[k] = levtArray[i] <= rightArray[j] ? levtArray[i++]
						: rightArray[j++];
			}
		}
	}

	private static void insertionSort(int[] a, int levtIndex, int rightIndex) {
		for (int i = levtIndex + 1; i <= rightIndex; i++) {
			int current = a[i];
			int j = i - 1;
			while (j >= levtIndex && a[j] > current) {
				a[j + 1] = a[j];
				j--;
			}
			a[j + 1] = current;
		}
	}

	public void run() {
		try {
			long t1 = System.currentTimeMillis();
			init();
			solve();
			out.close();
			long t2 = System.currentTimeMillis();
			System.err.println("Time = " + (t2 - t1));
		} catch (Exception e) {
			e.printStackTrace(System.err);
			System.exit(-1);
		}
	}

	class LOL implements Comparable<LOL> {
		int k;
		int r;

		@Override
		public int compareTo(LOL o) {

			return r - o.r; // ---->
			// return o.x - x; // <----
			// return o.y-y;
		}

		public LOL(int xx, int yy, int kk) {
			this.r = xx * xx + yy * yy;
			this.k = kk;
		}

	}

	public long gcd(long a, long b) {
		if (a % b == 0)
			return b;
		else
			return gcd(b, a % b);
	}

	public int gcd(int a, int b) {
		if (a % b == 0)
			return b;
		else
			return gcd(b, a % b);
	}

	public void solve() throws IOException {

			int n = readInt();
			int[] a = new int[65];
			
			a[1] = 1;
			a[2] = 1;
			a[3] = 1;
			a[4] = 2;
			a[5] = 1;
			a[6] = 2;
			a[7] = 1;
			a[8] = 5;
			a[9] = 2;
			a[10] = 2;
			a[11] = 1;
			a[12] = 5;
			a[13] = 1;
			a[14] = 2;
			a[15] = 1;
			a[16] = 14;
			a[17] = 1;
			a[18] = 5;
			a[19] = 1;
			a[20] = 5;
			a[21] = 2;
			a[22] = 2;
			a[23] = 1;
			a[24] = 15;
			a[25] = 2;
			a[26] = 2;
			a[27] = 5;
			a[28] = 4;
			a[29] = 1;
			a[30] = 4;
			a[31] = 1;
			a[32] = 51;
			a[33] = 1;
			a[34] = 2;
			a[35] = 1;
			a[36] = 14;
			a[37] = 1;
			a[38] = 2;
			a[39] = 2;
			a[40] = 14;
			a[41] = 1;
			a[42] = 6;
			a[43] = 1;
			a[44] = 4;
			a[45] = 2;
			a[46] = 2;
			a[47] = 1;
			a[48] = 52;
			a[49] = 2;
			a[50] = 5;
			a[51] = 1;
			a[52] = 5;
			a[53] = 1;
			a[54] = 15;
			a[55] = 2;
			a[56] = 13;
			a[57] = 2;
			a[58] = 2;
			a[59] = 1;
			a[60] = 13;
			a[61] = 1;
			a[62] = 2;
			a[63] = 4;
			a[64] = 267;
			
			out.print(a[n]);

	}
}