Problem: 

Input

The input contains a single integer a (1 ≤ a ≤ 40).

Output

Output a single string.

Examples

Input

2


Output

Adams


Input

8


Output

Van Buren


Input

29


Output

Harding

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class SolutionB {
   BufferedReader in;
   StringTokenizer str;
   PrintWriter out;
   String SK;
   String next() throws IOException {
      while ((str == null) || (!str.hasMoreTokens())) {
         SK = in.readLine();
         if (SK == null)
              return null;
         str = new StringTokenizer(SK);
      }
      return str.nextToken();
   }
   int nextInt() throws IOException {
      return Integer.parseInt(next());
   }
   double nextDouble() throws IOException {
      return Double.parseDouble(next());
   }
   long nextLong() throws IOException {
      return Long.parseLong(next());
   }
   char[] charArray() throws IOException{
      return next().toCharArray();
   }
   public static void main(String[] args) throws IOException {
      new SolutionB().run();
   }
   void run() throws IOException {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(System.out);
      //in = new BufferedReader(new FileReader("input.txt"));
      //out = new PrintWriter("output.txt");
      solve();
      out.close();
   }
   void solve() throws IOException {
      String names[]={"George Washington (1789-1797)",
"John Adams (1797-1801)",
"Thomas Jefferson (1801-1809)",
"James Madison (1809-1817)",
"James Monroe (1817-1825)",
"John Quincy Adams (1825-1829)",
"Andrew Jackson (1829-1837)",
"Martin Van Buren (1837-1841)",
"William H. Harrison (1841)",
"John Tyler (1841-1845)",
"James K. Polk (1841-1849)",
"Zachary Taylor (1849-1850)",
"Millard Fillmore (1850-1853)",
"Franklin Pierce (1853-1857)",
"James Buchanan (1857-1861)",
"Abraham Lincoln (1861-1865)",
"Andrew Johnson (1865-1869)",
"Ulysses S. Grant (1869-1877)",
"Rutherford B. Hayes (1877-1881)",
"James A. Garfield (1881)",
"Chester A. Arthur (1881-1885)",
"Grover Cleveland (1885-1889)",
"Benjamin Harrison (1889-1893)",
"Grover Cleveland (1893-1897)",
"William McKinley (1897-1901)",
"Theodore Roosevelt (1901-1909)",
"William H. Taft (1909-1913)",
"Woodrow Wilson (1913-1921)",
"Warren G. Harding (1921-1923)",
"Calvin Coolidge (1923-1929)",
"Herbert Hoover (1929-1933)",
"Franklin D. Roosevelt (1933-1945)",
"Harry S. Truman (1945-1953)",
"Dwight D. Eisenhower (1953-1961)",
"John F. Kennedy (1961-1963)",
"Lyndon B. Johnson (1963-1969)",
"Richard M. Nixon (1969-1974)",
"Gerald R. Ford (1974-1977)",
"Jimmy Carter (1977-1981)",
"Ronald Reagan (1981-1989)"};
              int n=nextInt();
              String s[]=names[n-1].split(" ");
              if(s.length==3){
                 out.println(s[1]);
              }
              else{
                 if(n==8)
                 out.println(s[1]+" "+s[2]);
                 else out.println(s[2]); 
               }

   }
   
}