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


public class Mysterious_strings_April_Fool {
/*
 *
 


 
George W. Bush
Barack Obama    

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