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.InputStreamReader;
import java.io.IOException;
import java.text.BreakIterator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

public class palin {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(System.out);
		Scanner scan = new Scanner(System.in);
		TaskC solver = new TaskC();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskC {
	public void solve(int testNumber, InputReader in, PrintWriter out) {
		String str[] = { "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" };
		out.print(str[in.nextInt()-1]);

	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

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

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