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.IOException;
import java.util.Scanner;

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