

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.FileReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Locale;
import java.util.StringTokenizer;

public class a {
    void do_solve() {
        String ans[] = 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",
        "Bush",
        "Clinton",
        "Bush",
        "Obama"};
        
        int n = nextInt();
        out.println(ans[n-1]);
        
    }

    void mainProgram() {
        init(null);
        int test = 0;
        long T = System.currentTimeMillis();
        do_solve();
        System.err.println("Time on test " + (test++) + ": "
                + (System.currentTimeMillis() - T) + " ms");
        out.close();
    }

    static void debug(Object... o) {
        System.err.println(Arrays.deepToString(o));
    }

    void init(String filename) {
        Locale.setDefault(Locale.US);
        if (filename != null)
            try {
                in = new BufferedReader(new FileReader(filename + ".in"));
                out = new PrintWriter(filename + ".out");
            } catch (Exception e) {
                e.printStackTrace();
                filename = null;
            }
        if (filename == null) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        }
        st = new StringTokenizer("");
    }

    static BufferedReader in;
    static StringTokenizer st = new StringTokenizer("");
    static PrintWriter out;
    static long systemTime;

    public static void main(String[] args) {
        try {
            setTime();
            new a().mainProgram();
            printTime();
            printMemory();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    static void setTime() {
        systemTime = System.currentTimeMillis();
    }

    static void printTime() {
        System.err.println("Time consumed: "
                + (System.currentTimeMillis() - systemTime));
    }

    static void printMemory() {
        System.err.println("Memory consumed: "
                + (Runtime.getRuntime().totalMemory() - Runtime.getRuntime()
                        .freeMemory()) / 1000 + "kb");
    }

    boolean hasMoreTokens() {
        try {
            while (!st.hasMoreTokens()) {
                st = new StringTokenizer(in.readLine());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return st.hasMoreTokens();
    }

    String nextToken() {
        return hasMoreTokens() ? st.nextToken() : null;
    }

    Integer nextInt() {
        return Integer.parseInt(nextToken());
    }

    Double nextDouble() {
        return Double.parseDouble(nextToken());
    }

    Long nextLong() {
        return Long.parseLong(nextToken());
    }

    BigInteger add(BigInteger A, BigInteger B) {
        return A.add(B);
    }

    BigInteger mult(BigInteger A, BigInteger B) {
        return A.multiply(B);
    }

    BigInteger sub(BigInteger A, BigInteger B) {
        return A.subtract(B);
    }

    BigInteger div(BigInteger A, BigInteger B) {
        return A.divide(B);
    }

    BigInteger mi(BigInteger A) {
        return (BigInteger.ZERO).subtract(A);
    }

    BigInteger sq(BigInteger A) {
        return A.multiply(A);
    }

    BigInteger val(long a) {
        return BigInteger.valueOf(a);
    }

    int cmp(BigInteger a, BigInteger b) {
        return a.compareTo(b);
    }

    BigInteger gcd(BigInteger a, BigInteger b) {
        if (cmp(a, val(0)) < 0)
            a = mi(a);
        if (cmp(b, val(0)) < 0)
            b = mi(b);
        return a.gcd(b);
    }
}
