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 Main {
	public static void main(String[] args) {
		Scanner sca = new Scanner (System.in);
		int a = sca.nextInt();
		String str = Integer.toBinaryString(a);
		while(str.length()<6) {
			str = "0"+str;
		}
		//System.out.println(str);
		
		StringBuilder st = new StringBuilder(str);
		char c1 = str.charAt(5);//第一位
		char c2 = str.charAt(1);//第五位
		st.setCharAt(5, c2);
		st.setCharAt(1, c1);
		//System.out.println(c1+" "+c2);
		char c3 = str.charAt(3);//第3位
		char c4 = str.charAt(2);//第4位
		//System.out.println(c3+" "+c4);
		st.setCharAt(2, c3);
		st.setCharAt(3, c4);
		str = st.toString();
		//System.out.println(st);
		
		System.out.println(Integer.valueOf(str,2));
	}
}