

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

public class MainA {

    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException {
        int a = in.nextInt();
        String[] pres = new String[] { "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(pres[a - 1]);
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

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

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

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

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

    public static void main(String[] arg) {
        new MainA().run();
    }
}
