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

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

public class C{
    public static void main(String[] args) throws Exception{
        //Scanner scan = new Scanner(new File("C.in"));
        Scanner scan = new Scanner(System.in);
        String n = Integer.toBinaryString(scan.nextInt());
        while(n.length()<6){
            n = "0"+n;
        }

        String s = ""+n.charAt(0)+n.charAt(5)+n.charAt(3)+n.charAt(2)+n.charAt(4)+n.charAt(1);
        
        int a = Integer.parseInt(s, 2);
        System.out.println(a);
    }
}