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 whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	static int ans(int i, int j){
		return (i>>j)&1;
	}
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int res = (ans(a,5)<<5) + (ans(a,4)<<0) + (ans(a,3)<<2) + (ans(a,2)<<3) + (ans(a,1)<<1) + (ans(a,0)<<4);
		System.out.println(res);
	}
}