Problem: 

Input

The input contains a single integer a (0 ≤ a ≤ 35).

Output

Output a single integer.

Examples

Input

3


Output

8


Input

10


Output

1024

Solution (in JAVA):

Solution:
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();
    }
}