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 aprila {
	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String s=Integer.toBinaryString(scan.nextInt());
		while(s.length()<6) s="0"+s;
		char[] b=new char[6];
		b[0]=s.charAt(0);
		b[1]=s.charAt(5);
		b[2]=s.charAt(3);
		b[3]=s.charAt(2);
		b[4]=s.charAt(4);
		b[5]=s.charAt(1);
		System.out.println(Integer.parseInt(new String(b),2));
	}
}