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:
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
If I'm the sun, you're the moon
Because when I go up, you go down
*******************************
I'm working for the day I will surpass you
https://www.a2oj.com/Ladder16.html
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class C
   {
      public static void main(String omkar[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         String N = convert(Integer.parseInt(st.nextToken()));
         int[] map = {0,5,3,2,4,1};
         int[] arr = new int[6];
         for(int b=0; b < 6; b++)
         {
            int val = Integer.parseInt(N.charAt(b)+"");
            arr[map[b]] = val;
         }
         int res = 0;
         for(int b=0; b < 6; b++)
            res += arr[b]*(1<<(6-b-1));
         System.out.println(res);
      }
      public static String convert(int N)
      {
         String res = "";
         for(int b=5; b >= 0; b--)
         {
            if((N&(1<<b)) > 0)
               res += 1;
            else
               res += 0;
         }
         return res;
      }
   }