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.*;
import java.lang.*;
public class Cf1331C {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n,i=5,s=0,p,temp;
		n=sc.nextInt();
		int []arr=new int[6];
		while(n!=0) {
			arr[i]=n%2;
			n=n/2;
			i--;
		}
		temp=arr[2];
		arr[2]=arr[3];
		arr[3]=temp;
		temp=arr[1];
		arr[1]=arr[5];
		arr[5]=temp;
		p=5;
		for (i=0;i<6;i++) {
			s=s+arr[i]*(int)Math.pow(2,p);
			p--;
		}
		System.out.println(s);
		sc.close();
	}

}