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 Debug {
    private static Scanner in =new Scanner(System.in);
    public static ArrayList<String> gen(int[]set){
        ArrayList<String> list=new ArrayList<String> ();
        for(int i=1;i<Math.pow(2,set.length);i++){
            StringBuilder build=new StringBuilder();
            for(int j=0;j<set.length;j++)
                if((i&(1<<j))>0)
                    build.append(set[j]+",");
            list.add(build.toString());
        }
        return list;
    }
    public static int OR(String a){
        String[]z=a.split(",");
        int or=Integer.parseInt(z[0]);
        for(int i=1;i<z.length;i++){
            int cur=Integer.parseInt(z[i]);
            int x=or|cur;
            or=x;
        }
        return or;
    }
    public static void main(String[] args){
        int n=in.nextInt();
        if(n%2==0)
            System.out.println("0");
        else
            System.out.println(1);
    }
    }