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.BufferedWriter;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;
import java.util.Stack;
import java.util.Vector;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
	public static void main(String[] args) throws IOException {
		Task task = new Task();
		task.getData();
		task.solve();
		task.printAnswer();
	}
}

class Task {
	int n;

	StringBuilder answer = new StringBuilder();

	public void getData() throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// BufferedReader br = new BufferedReader(new FileReader("input.txt"));

		// String[] data = br.readLine().split(" ");
		n = Integer.parseInt(br.readLine());

		br.close();
	}

	public void solve() throws IOException {
		String str = "Washington / J.Adams / Jefferson / Madison / Monroe / J.Q.Adams / Jackson / Van Buren / W.H.Harrison / Tyler / Polk / Taylor / Fillmore / Pierce / Buchanan / Lincoln / A.Johnson / Grant / Hayes / Garfield / Arthur / Cleveland / B.Harrison / Cleveland / McKinley / T.Roosevelt / Taft / Wilson / Harding / Coolidge / Hoover / F.Roosevelt / Truman / Eisenhower / Kennedy / L.Johnson / Nixon / Ford / Carter / Reagan / Bush / Clinton";
		String[] names = str.split(" / ");
		answer.append(names[n - 1].replaceAll("\\w+\\.", ""));
	}

	private ArrayList<Integer> firstPrimes(int bound) {
		boolean[] isPrime = new boolean[bound];
		Arrays.fill(isPrime, 2, isPrime.length, true);
		for (int i = 2; i <= Math.sqrt(bound); ++i) {
			if (isPrime[i]) {
				for (int j = i * i; j < bound; j += i) {
					isPrime[j] = false;
				}
			}
		}

		ArrayList<Integer> primes = new ArrayList<Integer>();
		for (int i = 0; i < isPrime.length; ++i) {
			if (isPrime[i]) {
				primes.add(i);
			}
		}
		return primes;
	}

	public void printAnswer() throws IOException {
		System.out.print(answer);
		// BufferedWriter bw = new BufferedWriter(new FileWriter(new
		// File("output.txt")));
		// bw.append(answer);
		// bw.close();
	}
}