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.*;
import java.io.*;

public class C {
    public static void main(String[] args) throws IOException{
        BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
        int n = Integer.parseInt(f.readLine());
        int[] arr1 = new int[]{32, 1, 4, 8, 2, 16};
        int ans = 0;
        for(int i = 5; i >= 0; i--){
            if(n % 2 == 1) ans += arr1[i];
            n/=2;
        }
        out.println(ans);
        out.close();

    }
}