

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.util.Arrays;
import java.util.Scanner;

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