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

public class Solution {

    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        //BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
        int a=Integer.parseInt(br.readLine());
        String str="";
        String s="";
        if(a==0)
            System.out.print("0");
        else{
        while(a!=0)
        {   if(a%2==0)
                str="0"+str;
            else
                str="1"+str;
            a=a>>1;
        }
        int len=str.length();
        for(int i=0;i<(6-len);i++)
            str="0"+str;
        s=s+str.charAt(0);
        //System.out.println(s);
        s=s+str.charAt(5);
        //System.out.println(s);
        s=s+str.charAt(3);
        //System.out.println(s);
        s=s+str.charAt(2);
        //System.out.println(s);
        s=s+str.charAt(4);
        //System.out.println(s);
        s=s+str.charAt(1);
        //System.out.println(s);
        int ans=0;
        int p=32;
        for(int i=0;i<6;i++){
            ans=ans+Integer.parseInt(Character.toString(s.charAt(i)))*p;
            p/=2;   
        }
        System.out.print(ans);
        }
        //bw.flush();
    }
}