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 bitmaskiFoolMain {
	public static void main(String[] args) {
		Scanner k = new Scanner(System.in);
		int num = k.nextInt();
		String a = Integer.toBinaryString(num);
		StringBuilder o = new StringBuilder();
		int r =6-a.length();
		if(r>0) {
			for (int j=0; j<r; j++) {
			o.append("0");
		}
			
		}
		
		for (int j=0; j<a.length(); j++) {
			o.append(a.charAt(j));
		}
		
		StringBuilder n = new StringBuilder();
		for (int i=0; i<6; i++)
		{
		      if (i == 0) {
                  n.append(o.charAt(0));
              }
              if (i == 1) {
                  n.append(o.charAt(5));
              }
              if (i == 2) {
                  n.append(o.charAt(3));
              }
              if (i == 3) {
                  n.append(o.charAt(2));
              }
              if (i == 4) {
                  n.append(o.charAt(4));
              }
              ;
              if (i == 5) {
                  n.append(o.charAt(1));
              }
		}
		
		System.out.print(Integer.parseInt(n.toString(), 2));
	}
 
}