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.util.*;
import java.io.*;

public class C
{  
   public static void main(String[] args)
   {
      Scanner in = new Scanner(System.in);
      
      int n = in.nextInt();
      
      in.close();
      
      String binary = Integer.toBinaryString(n);
      
      while(binary.length() < 6){
         binary = "0".concat(binary);
      }
      
      String a = binary.substring(0, 1);
      String b = binary.substring(1, 2);
      String c = binary.substring(2, 3);
      String d = binary.substring(3, 4);
      String e = binary.substring(4, 5);
      String f = binary.substring(5, 6);
      
      String shuffled = a.concat(f).concat(d).concat(c).concat(e).concat(b);
      
      System.out.print(Integer.parseInt(shuffled, 2));
   }
}