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.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;

public class Main {
	
	public static void main(String[] args) throws Exception {
	
		String[] pres = {
				"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"
		};
		println(pres[nextInt() - 1]);
		
		
	}
	
	private static PrintWriter out =  new PrintWriter(System.out);
	private static BufferedReader inB = new BufferedReader(new InputStreamReader(System.in));	
	private static StreamTokenizer in = new StreamTokenizer(inB);
	
	private static void exit(Object o) throws Exception {
		out.println(o);
		out.flush();
		System.exit(0);
	}
	private static void println(Object o) throws Exception{
		out.println(o);
		out.flush();
	}
	private static void print(Object o) throws Exception{
		out.print(o);
		out.flush();
	}
	private static int nextInt() throws Exception {
		in.nextToken();
		return (int)in.nval;
	}  
	private static String nextString() throws Exception {
		in.nextToken();
		return in.sval;        
	}
	
}