

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.InputStreamReader;
import java.util.HashMap;


public class Main {

	static HashMap<Integer, String> presidents ;	
	
	public static void main(String[] args) throws Throwable {
		presidents = new HashMap<Integer, String>();
		presidents.put(1, "Washington");
		presidents.put(2, "Adams");
		presidents.put(3, "Jefferson");
		presidents.put(4, "Madison");
		presidents.put(5, "Monroe");
		presidents.put(6, "Adams");
		presidents.put(7, "Jackson");
		presidents.put(8, "Van Buren");
		presidents.put(9, "Harrison");
		presidents.put(10, "Tyler");
		
		presidents.put(11, "Polk");
		presidents.put(12, "Taylor");
		presidents.put(13, "Fillmore");
		presidents.put(14, "Pierce");
		presidents.put(15, "Buchanan");
		presidents.put(16, "Lincoln");
		presidents.put(17, "Johnson");
		presidents.put(18, "Grant");
		presidents.put(19, "Hayes");
		presidents.put(20, "Garfield");
		
		presidents.put(21, "Arthur");
		presidents.put(22, "Cleveland");
		presidents.put(23, "Harrison");
		presidents.put(24, "Cleveland");
		presidents.put(25, "McKinley");
		presidents.put(26, "Roosevelt");
		presidents.put(27, "Taft");
		presidents.put(28, "Wilson");
		presidents.put(29, "Harding");
		presidents.put(30, "Coolidge");
		
		presidents.put(31, "Hoover");
		presidents.put(32, "Roosevelt");
		presidents.put(33, "Truman");
		presidents.put(34, "Eisenhower");
		presidents.put(35, "Kennedy");
		presidents.put(36, "Johnson");
		presidents.put(37, "Nixon");
		presidents.put(38, "Ford");
		presidents.put(39, "Carter");
		presidents.put(40, "Reagan");
		
		BufferedReader in = new BufferedReader( new InputStreamReader( System.in ) );
		for (String line; (line=in.readLine())!=null; ) {
			int a  = Integer.parseInt(line);
			System.out.println(presidents.get(a));
		}

	}

}
