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.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class A {
    
    static StringTokenizer st;
    static BufferedReader in;
    public static void main(String[] args) throws IOException {
        in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int n = nextInt();
        String[]ans = {"Washington", 
                "Adams",
                "Jefferson",
                "Madison",
                "Monroe",
                "Adams",
                "Jackson",
                "Van Buren",
                "Harrison",
                "Tyler",
                "Polk",
                "Taylor",
                "Fillmore",
                "Pierce",
                "Buchanan",
                "Lincoln",
                "Johnson",
                "Grant",
                "Hayes",
                "Garfield",
                "Arthur",
                "Cleveland",
                "Harrison",
                "Cleveland",
                "McKinley",
                "Roosevelt",
                "Taft",
                "Wilson",
                "Harding",
                "Coolidge",
                "Hoover",
                "Roosevelt",
                "Truman",
                "Eisenhower",
                "Kennedy",
                "Johnson",
                "Nixon",
                "Ford",
                "Carter",
                "Reagan"
        };
        System.out.println(ans[n-1]);
        pw.close();
    }
    private static int nextInt() throws IOException{
        return Integer.parseInt(next());
    }
    
    private static long nextLong() throws IOException{
        return Long.parseLong(next());
    }
    
    private static double nextDouble() throws IOException{
        return Double.parseDouble(next());
    }
    
    private static String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
}