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 C {
    public static void main(String[] args) {
        Scanner std = new Scanner(System.in);
        int ans = std.nextInt();
        int bit0 = Integer.bitCount(ans & 1);
        int bit1 = Integer.bitCount(ans & 2);
        int bit2 = Integer.bitCount(ans & 4);
        int bit3 = Integer.bitCount(ans & 8);
        int bit4 = Integer.bitCount(ans & 16);
        int bit5 = Integer.bitCount(ans & 32);
        int next = (bit0 << 4) | (bit1 << 1) | (bit2 << 3) | (bit3 << 2) | (bit4 << 0) | (bit5 << 5);
        System.out.println(next);

    }
}