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 S 
{
    public static void main(String ag[])
    {
        Scanner sc=new Scanner(System.in);
        int i,j,k;
        int N=sc.nextInt();
        int arr[] ={4,1,3,2,0,5};
        int ans=0;
        for(i=0;i<=5;i++) 
        {
            if((N&(1<<i))>=1) 
            {
                ans+=(1<<arr[i]);
            }
        }
        System.out.println(ans);
    }
    
}