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.math.*;
import java.util.*;
import java.util.Arrays;
public class Test1{
    public static void main(String args[])throws IOException{
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int i=5;
        int a[]=new int[6];
        while(n>0)
        {
            int d=n%2;
            a[i]=d;
            i--;
            n/=2;
        }
        int nw=32*a[0]+16*a[5]+8*a[3]+4*a[2]+2*a[4]+1*a[1];
        System.out.println(nw);
    }
}