

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
// @author Sanzhar
import java.io.*;
import java.util.*;
import java.awt.Point;

public class Template {

    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

    String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(in.readLine());
            } catch (Exception e) {
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    public void run() throws Exception {
        //in = new BufferedReader(new FileReader("passwords.in"));
        //out = new PrintWriter(new FileWriter("passwords.out"));
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.flush();
        out.close();
        in.close();
    }

    public void solve() throws Exception {
        int a = nextInt();
        String[] names = {"", "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"};
        out.println(names[a]);
    }

    public static void main(String[] args) throws Exception {
        new Template().run();
    }
}