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 HelloWorld{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
       int n = sc.nextInt();
		int[] a = new int[6];
		for(int i = 0; i < 6; i++) {
			a[i] = (n >> i) & 1;
		}
		int[] b = new int[6];
		b[5] = a[5];
		b[4] = a[0];
		b[3] = a[2];
		b[2] = a[3];
		b[1] = a[1];
		b[0] = a[4];
		int ans = 0;
		for(int i = 0; i < 6; i++) {
			ans |= (b[i] << i);
		}
        System.out.println(ans);
     }
}