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.*;

public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String s = "";
        for(int i=5;i>=0;i--){
            int mask = 1<<i;
            s+= (mask & num)!=0?'1':'0';
        }
        StringBuffer s1 = new StringBuffer(s);
        Character temp1 = s.charAt(1);
        Character temp2 = s.charAt(2);
        s1.setCharAt(1,s.charAt(5));
        s1.setCharAt(2,s.charAt(3));
        s1.setCharAt(5,temp1);
        s1.setCharAt(3,temp2);
        System.out.println(Integer.parseInt(s1.toString(),2));
    }
    
}