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.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
import java.util.Queue;
import java.util.Scanner;


public class Solver {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void init(boolean n[], int m[]){
		int y=1;
		for(int i = 2;i<100;i++){
			boolean t = true;
			for(int j = 2;j<i;j++){
				if(i%j==0)t=false;
			}
			n[i]=t;
			if(t){
				m[i]=y;
				n[i]=t;
				y++;
			}
		}
	}
	public static void main(String[] args) throws Exception {
		//PrintWriter pw;
		Scanner sc;
		//pw = System.out;
		sc = new Scanner(System.in);
		int n = sc.nextInt();
		//System.out.print("YES");
		switch(n){
		case 1: System.out.print("Washington");break;
		case 2: System.out.print("Adams");break;
		case 3: System.out.print("Jefferson");break;
		case 4: System.out.print("Madison");break;
		case 5: System.out.print("Monroe");break;
		case 6: System.out.print("Adams");break;
		case 7: System.out.print("Jackson");break;
		case 8: System.out.print("Van Buren");break;
		case 9: System.out.print("Harrison");break;
		case 10: System.out.print("Tyler");break;
		case 11: System.out.print("Polk");break;
		case 12: System.out.print("Taylor");break;
		case 13: System.out.print("Fillmore");break;
		case 14: System.out.print("Pierce");break;
		case 15: System.out.print("Buchanan");break;
		case 16: System.out.print("Lincoln");break;
		case 17: System.out.print("Johnson");break;
		case 18: System.out.print("Grant");break;
		case 19: System.out.print("Hayes");break;
		case 20: System.out.print("Garfield");break;
		case 21: System.out.print("Arthur");break;
		case 22: System.out.print("Cleveland");break;
		case 23: System.out.print("Harrison");break;
		case 24: System.out.print("Cleveland");break;
		case 25: System.out.print("McKinley");break;
		case 26: System.out.print("Roosevelt");break;
		case 27: System.out.print("Taft");break;
		case 28: System.out.print("Wilson");break;
		case 29: System.out.print("Harding");break;
		case 30: System.out.print("Coolidge");break;
		case 31: System.out.print("Hoover");break;
		case 32: System.out.print("Roosevelt");break;
		case 33: System.out.print("Truman");break;
		case 34: System.out.print("Eisenhower");break;
		case 35: System.out.print("Kennedy");break;
		case 36: System.out.print("Johnson");break;
		case 37: System.out.print("Nixon");break;
		case 38: System.out.print("Ford");break;
		case 39: System.out.print("Carter");break;
		case 40: System.out.print("Reagan");
		}
		/*init(n,m);
		int x = sc.nextInt();
		int y = sc.nextInt();
		if(n[y]==true&&m[x]+1==m[y]){
			System.out.print("YES");
		}else{
			System.out.print("NO");
		}*/
		/*int n = sc.nextInt();
		if(n==1){
			System.out.print("0");
			pw.print("0");
			pw.close();
			return;
		}
		int mas [] =new int[n+1];
		mas[1]=-1;
		int max=0;
		List<Integer> list = new ArrayList<Integer>();
		for(int i = 2;i<=n;i++){
			mas[i]=sc.nextInt();
		}
		for(int i =2;i<=n;i++){
			int t = i;
			int s = 0;
			while(mas[t]!=-1){
				s++;
				t=mas[t];
			}
			if(max<s){
				max=s;
				list = new ArrayList<Integer>();
				list.add(i);
			}else
			if(max==s){
				list.add(i);
			}			
		}
		
		pw.print(max+"\n"+list.size()+"\n");
		System.out.print(max+"\n"+list.size()+"\n");
		for(Integer i: list){
			pw.print(i+" ");
			System.out.print(i+" ");
		}*/
		//pw.close();
		
	}

}