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.util.*;

public class AOddSum {
	
    public static void main(String[] args){ 
	        
    	Scanner s = new Scanner(System.in);
    	int n = s.nextInt();
    	int arr[] = new int[6];
    	for(int i=0 ; i<6 ; i++) {
    		int m = n%2;
    		if(n>=1) {
    			arr[i] = m;
    			n = n/2;
    		}
    		else break;
    	}
    	int temp = arr[0];
    	arr[0] = arr[4];
    	arr[4] = temp;
    	int temp2 = arr[2];
    	arr[2] = arr[3];
    	arr[3] = temp2;	
    	int output = 0;
    	for(int i=0 ; i<6 ; i++) {
    		output += arr[i] * (int)Math.pow(2, i);
    	}
    	System.out.println(output);
    } 	
}