

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
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;


public class Main {

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

		
		output.print(mas[n]);
		
		output.close();
	}



	private int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextString());
	}

	private String nextString() throws IOException {
		while (!stoken.hasMoreTokens()){
			String st = input.readLine();
			stoken = new StringTokenizer(st);	
		}
		return stoken.nextToken();
	}

}
