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

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

public class Happily {  
    public static void main(String[] args) {
        FastReader in = new FastReader();
        
        int num = in.nextInt();
        String bin = Integer.toBinaryString(num);
        
        while(bin.length() < 6) {
            bin = "0" + bin;
        }
        
        int out = 0;
        for(int i = 0; i < bin.length(); i++) {
            int currBin = Integer.parseInt(bin.substring(i, i + 1));
            
            if(i == 0) {
                out += 32 * currBin;
            }
            else if(i == 1) {
                out += currBin;
            }
            else if(i == 2) {
                out += 4 * currBin;
            }
            else if(i == 3) {
                out += 8 * currBin;
            }
            else if(i == 4) {
                out += 2 * currBin;
            }
            else if(i == 5) {
                out += 16 * currBin;
            }
        }
        
        System.out.println(out);
    }
    
    static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        }
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                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()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
}