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 priyank_parekh;

import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        String res = Integer.toBinaryString(num);

        if(res.length() < 6) {
            int len = res.length();
            for(int i=0; i<6-len; i++) {
                res = "0" + res;
            }
        }

        String stringBuilder = String.valueOf(res.charAt(0)) +
                res.charAt(5) +
                res.charAt(3) +
                res.charAt(2) +
                res.charAt(4) +
                res.charAt(1);

        System.out.println(Integer.parseInt(stringBuilder, 2));
    }
}