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.io.*;
import java.util.StringTokenizer;
import java.util.*;
import java.math.*;
import java.lang.Integer;

public class Solution {

	public static void main(String[] args) throws Exception {
		FastScanner cin = new FastScanner(System.in);
		int n = cin.nextInt();
		int arr[]= new int[6];
		
		for (int i=0; i<6; i++){
			arr[i]=n%2;
			n=n/2;
		}
		
		int arrnew[]= new int[6];
		
		arrnew[0]=arr[4];
		arrnew[1]=arr[1];
		arrnew[2]=arr[3];
		arrnew[3]=arr[2];
		arrnew[4]=arr[0];
		arrnew[5]=arr[5];
		
		int nnew=0;
		for (int i=0; i<6; i++){
			nnew=nnew+arrnew[i]*(int)Math.pow(2,i);
		}
		

		System.out.println(nnew);
	}



	static class FastScanner {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;

		public FastScanner(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
			tokenizer = null;
		}

		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public String nextLine() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					return reader.readLine();
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}

			return tokenizer.nextToken("\n");
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

	}
}