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:
//package Round_FirstApril_2013;

import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class A {

    void solve () throws IOException {
        int a = in.nextInt();
        String s = "";
        switch (a) {
        case 1:
            s = "Washington";
            break;
        case 2:
            s = "Adams";
            break;
        case 3:
            s = "Jefferson";
            break;
        case 4:
            s = "Madison";
            break;
        case 5:
            s = "Monroe";
            break;
        case 6:
            s = "Adams";
            break;
        case 7:
            s = "Jackson";
            break;
        case 8:
            s = "Van Buren";
            break;
        case 9:
            s = "Harrison";
            break;
        case 10:
            s = "Tyler";
            break;
        case 11:
            s = "Polk";
            break;
        case 12:
            s = "Taylor";
            break;
        case 13:
            s = "Fillmore";
            break;
        case 14:
            s = "Pierce";
            break;
        case 15:
            s = "Buchanan";
            break;
        case 16:
            s = "Lincoln";
            break;
        case 17:
            s = "Johnson";
            break;
        case 18:
            s = "Grant";
            break;
        case 19:
            s = "Hayes";
            break;
        case 20:
            s = "Garfield";
            break;
        case 21:
            s = "Arthur";
            break;
        case 22:
            s = "Cleveland";
            break;
        case 23:
            s = "Harrison";
            break;
        case 24:
            s = "Cleveland";
            break;
        case 25:
            s = "McKinley";
            break;
        case 26:
            s = "Roosevelt";
            break;
        case 27:
            s = "Taft";
            break;
        case 28:
            s = "Wilson";
            break;
        case 29:
            s = "Harding";
            break;
        case 30:
            s = "Coolidge";
            break;
        case 31:
            s = "Hoover";
            break;
        case 32:
            s = "Roosevelt";
            break;
        case 33:
            s = "Truman";
            break;
        case 34:
            s = "Eisenhower";
            break;
        case 35:
            s = "Kennedy";
            break;
        case 36:
            s = "Johnson";
            break;
        case 37:
            s = "Nixon";
            break;
        case 38:
            s = "Ford";
            break;
        case 39:
            s = "Carter";
            break;
        case 40:
            s = "Reagan";
            break;
        default:
            break;
        }
        out.println(s);
    }

    String input = "";
    String output = "";

    FastScanner in;
    PrintWriter out;

    void run () {
        try {
            BufferedReader bf;
            if (input.length() == 0)
                bf = new BufferedReader(new InputStreamReader(
                        System.in));
            else
                bf = new BufferedReader(new FileReader(input));
            in = new FastScanner(bf);

            if (output.length() == 0)
                out = new PrintWriter(System.out);
            else
                out = new PrintWriter(new File(output));

            solve();

            out.close();
        } catch (Exception ex) {
            out.close();
            ex.printStackTrace();
        }
    }

    public static void main (String[] args) {
        new A().run();
    }

    class FastScanner {
        BufferedReader bf;
        StringTokenizer st;

        FastScanner(BufferedReader bf) {
            this.bf = bf;
        }

        String next () throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(bf.readLine());
            return st.nextToken();
        }

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

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

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

        int[] readIntArray (int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long[] readLongArray (int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}