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.lang.*;
public class sol{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        
        String s = Integer.toBinaryString(a);
        // System.out.println(s);
        int n = s.length();
        int i = n;
        while(i<6){
            s = "0"+s;
            i++;
        }
        // System.out.println(s);
        char[] ch = s.toCharArray();
        char c1 = ch[1];
        char c2 = ch[2];
        
        ch[1] = ch[5];
        ch[5] = c1;
        ch[2] = ch[3];
        ch[3] = c2;
        
        String ans = new String(ch);
        // System.out.println(ans);
        int foo = Integer.parseInt(ans, 2);
        System.out.println(foo);
        
    }
}