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.*;

import java.io.*;

public class bin {

	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		int bin = Integer.parseInt(in.readLine());
		String chng = Integer.toString(bin,2);
		int len = chng.length();
		int remainlen = 6-len;
		StringBuilder sb = new StringBuilder();
		while(remainlen  > 0) {
			sb.append("0");
			remainlen--;
		}
		sb.append(chng);
		char[] tangy = new char[6];
		for(int i=0; i<6; i++) {
			tangy[i]=sb.charAt(i);
		}
		char tmp = tangy[1];
		tangy[1]=tangy[5];
		tangy[5]=tmp;
		char tmp1 = tangy[2];
		tangy[2]=tangy[3];
		tangy[3]=tmp1;
		String ans = new String(tangy);

		long po = Long.parseLong(ans,2);
		System.out.println(po);
		
		
	}
	
}