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:
/*
[ ( ^ _ ^ ) ]
*/

// problem: cf/1331/C

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


public class c {
    int INF = (int)1e9;
    long MOD = 1000000007;

    String bin(int n) {
        if(n<=1) return ""+n;
        return bin(n/2) + n%2;
    }

    int go(String s) {
        if(s.length()==0) {
            return 0;
        }
        int n = s.length();
        int x = s.charAt(n-1)-'0';
        return 2 * go(s.substring(0, n-1)) + x;
    }

    void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        String b = bin(n);
        while(b.length()<6) {
            b = "0"+b;
        }
        char[] s = b.toCharArray();
        String rs = "" + s[0] + s[5] + s[3] + s[2] + s[4] + s[1];
        int x = go(rs);
        out.println(x);
    }
    

    public static void main(String[] args) throws IOException {
        if(args.length>0 && args[0].equalsIgnoreCase("d")) {
            DEBUG_FLAG = true;
        }
        InputReader in = new InputReader();
        PrintWriter out = new PrintWriter(System.out);
        int t = 1;//in.nextInt();
        long start = System.nanoTime();
        while(t-- >0) {
            new c().solve(in, out);
        }
        long end = System.nanoTime();
        debug("\nTime: " + (end-start)/1e6 + " \n\n");
        out.close();
    }
    
    static boolean DEBUG_FLAG = false;
    static void debug(String s) {
        if(DEBUG_FLAG) System.out.print(s);
    }
    
    public static void show(Object... o) {
        System.out.println(Arrays.deepToString(o));
    }
    
    static class InputReader {
        static BufferedReader br;
        static StringTokenizer st;
    
        public InputReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        
        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        int nextInt() {
            return Integer.parseInt(next());
        }
        
        long nextLong() {
            return Long.parseLong(next());
        }
        
        double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}