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.Scanner;

public class AndAfterHappilyLivedEverThey {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[6];
        int i = 5;
        while (0 < n) {
            if (n % 2 == 0) {
                a[i] = 0;
            } else {
                a[i] = 1;
            }
            i--;
            n = n / 2;
        }
        int temp = a[5];
        a[5] = a[1];
        a[1] = temp;
        temp = a[3];
        a[3] = a[2];
        a[2] = temp;
        int res = 0;
        for (int j = 0; j < 6; j++) {
            if(a[j] == 1)
                res+= Math.pow(2,(6-j-1));
        }
        System.out.println(res);
    }
}