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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author sukhdeep
 */
public class s {
    
    

  
    public static void main(String arg[]) throws IOException
    {
        
        
        String a[]=new String[40];
        a[0]="Washington";
        a[1]="Adams";
        a[2]="Jefferson";
        a[3]="Madison";
        a[4]="Monroe";
        a[5]="Adams";
        a[6]="Jackson";
        a[7]="Van Buren";
        a[8]="Harrison";
        a[9]="Tyler";
        a[10]="Polk";
        a[11]="Taylor";
        a[12]="Fillmore";
        a[13]="Pierce";
        a[14]="Buchanan";
        a[15]="Lincoln";
        a[16]="Johnson";
        a[17]="Grant";
        a[18]="Hayes";
        a[19]=   "Garfield";     
        a[20]="Arthur";
        a[21]="Cleveland";
        a[22]="Harrison";
        a[23]="Cleveland";
        a[24]="McKinley";
        a[25]="Roosevelt";
        a[26]="Taft";
        a[27]="Wilson";
        a[28]="Harding";
        a[29]="Coolidge";
        a[30]="Hoover";
        a[31]="Roosevelt";
        a[32]="Truman";
        a[33]="Eisenhower";
        a[34]="Kennedy";
        a[35]="Johnson";
        a[36]="Nixon";
        a[37]="Ford";
        a[38]="Carter";
        a[39]="Reagan";  
        BufferedReader r=new BufferedReader(new InputStreamReader(System.in));
        String sb=r.readLine();
       int aa= Integer.parseInt(sb);
        System.out.println(a[aa-1]);
    }    
    
    
}