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.*;
        import java.util.*;
public class AF2020C {
    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder str=new StringBuilder();
        int N=Integer.parseInt(in.readLine());
        String bin=Integer.toBinaryString(N);
        while (bin.length()<6)
            bin="0"+bin;
        String b=""+bin.charAt(0)+bin.charAt(5)+bin.charAt(3)+bin.charAt(2)+bin.charAt(4)+bin.charAt(1);
        System.out.println(Integer.parseInt(b,2));
    }
}