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:
//package ZS12_2A;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		String binary = "";
		while(n!=0) {
			binary = n % 2 + binary;
			n/=2;
		}
		while(binary.length()!=6) binary = "0"+binary;
		String res = "" + binary.charAt(0) + binary.charAt(5) + binary.charAt(3) + binary.charAt(2) + binary.charAt(4) + binary.charAt(1);
		int ans = 0;
		for(int i = res.length() - 1 ; i >= 0 ; i--)
			if(res.charAt(i)=='1') ans+=Math.pow(2, res.length() - i - 1);
		System.out.println(ans);

	}

}