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.*;
import java.util.StringTokenizer;

public class ProblemA {

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

    private BufferedReader in = null;
    private PrintWriter out = null;
    private StringTokenizer tok = new StringTokenizer("");

    public ProblemA() throws Exception {
        init();
        solve();
        in.close();
        out.close();
    }

    private void solve() throws Exception {
        String[] a = 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(a[nextInt() - 1]);
    }


    private void init() throws FileNotFoundException {
        in = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }


    private int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    private long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }


    private String nextToken() throws IOException {
        while (!tok.hasMoreTokens()) {
            String s = in.readLine();
            if (s == null) {
                return null;
            }
            tok = new StringTokenizer(s);
        }
        return tok.nextToken();
    }

}