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.Scanner;
public class Main{
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        while ( s.hasNext() ) {
            int a=s.nextInt();
            String ans=Integer.toBinaryString(a); //转二进制
            int len=ans.length();
            for (int i=0; i < 6-len; i++) {
                ans="0"+ans;
            }
            //交换
            char[] c=ans.toCharArray();
            char temp=c[1],m=c[2];
            c[1]=c[5];
            c[5]=temp;
            c[2]=c[3];
            c[3]=m;
            long sum=0;
            for ( int i=0; i < c.length; i++ ) {
                if ( c[i] == '1') sum+=Math.pow(2,5-i);
            }
            System.out.println(sum);
        }
    }
}