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

public class C {
    private void work() {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in), 1 << 16));
        int n = sc.nextInt();
        sc.close();
        int x = 0;
        int[] a = {4, 1, 3, 2, 0, 5};
        for (int i = 0; i < 6; i++) {
            if (((1 << a[i]) & n) != 0) {
                x |= 1 << i;
            }
        }
        System.out.println(x);
    }

    public static void main(String[] args) {
        new C().work();
    }
}