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

public class A{
    public static void main(String[] strings){
        int num = new Scanner(System.in).nextInt();
        StringBuilder input = new StringBuilder(Integer.toBinaryString(num));
        while (input.length() != 6)
            input.insert(0, '0');

        char temp = input.charAt(1);
        input.replace(1,2,String.valueOf(input.charAt(5)));
        input.replace(5,6,String.valueOf(temp));

        temp = input.charAt(2);
        input.replace(2,3,String.valueOf(input.charAt(3)));
        input.replace(3,4,String.valueOf(temp));



        System.out.println(Integer.parseInt(input.toString(), 2));


    }
}