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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class C {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int t = Integer.parseInt(br.readLine());
		String s = Integer.toString(t, 2);
		int ans = 0;

		for (int i = s.length()-1; i>=0; i--) {
			if (s.charAt(i)=='1') {
				if (i==s.length()-1)
					ans+=16;
				else if (i==s.length()-2)
					ans+=2;
				else if (i==s.length()-3)
					ans+=8;
				else if (i==s.length()-4)
					ans+=4;
				else if (i==s.length()-5)
					ans+=1;
				else if (i==s.length()-6)
					ans+=32;
			}
		}
		System.out.println(ans);
	}
}