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.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Scanner;
import java.util.Set;

public class code3 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
		String a = Integer.toBinaryString(n);
		int k = 6-a.length();
		for(int i=0; i<k; i++)
			a = "0" + a;
		String str = "";
		str += a.charAt(0);
		str += a.charAt(5);
		str += a.charAt(3);
		str += a.charAt(2);
		str += a.charAt(4);
		str += a.charAt(1);
		System.out.println(Integer.parseInt(str, 2));
	}
	

}