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.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Arrays;
import java.util.Scanner;


public class Codeforces {

    private static MyScanner in;
    private static PrintStream out;

    public static void main(String[] args) throws IOException {
        out = System.out;
        boolean usingFileForIO = false;
        if (usingFileForIO) {
            in = new MyScanner("input.txt");
            out = new PrintStream("output.txt");
        } else {
            in = new MyScanner();
            out = System.out;
        }

        solve();
    }

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

    static class MyScanner {
        Scanner inp = null;

        public MyScanner() throws IOException {
            inp = new Scanner(System.in);
        }

        public MyScanner(String inputFile) throws IOException {
            inp = new Scanner(new FileInputStream(inputFile));
        }

        public int nextInt() throws IOException {
            return inp.nextInt();
        }

        public long nextLong() throws IOException {
            return inp.nextLong();
        }

        public double nextDouble() throws IOException {
            return inp.nextDouble();
        }

        public String nextString() throws IOException {
            return inp.next();
        }
    }
}