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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Scanner;
import java.util.function.Function;
import java.util.stream.Collectors;
public class _p000952A {
    static public void main(final String[] args) throws IOException {
        p000952A._main(args);
    }
//begin p000952A.java
static private class p000952A extends Solver{public p000952A(){nameIn="p000952A.in"
;singleTest=true;}int a;@Override protected void solve(){pw.println(a % 2);}@Override
public void readInput()throws IOException{a=sc.nextInt();if(sc.hasNextLine()){sc
.nextLine();}}static public void _main(String[]args)throws IOException{new p000952A
().run();}}
//end p000952A.java
//begin net/leksi/contest/Solver.java
static private abstract class Solver{protected String nameIn=null;protected String
nameOut=null;protected boolean singleTest=false;protected boolean preprocessDebug
=false;protected boolean doNotPreprocess=false;protected Scanner sc=null;protected
PrintWriter pw=null;private void process()throws IOException{if(!singleTest){int
t=lineToIntArray()[0];while(t-->0){readInput();solve();}}else{readInput();solve(
);}}abstract protected void readInput()throws IOException;abstract protected void
solve()throws IOException;protected int[]lineToIntArray()throws IOException{return
Arrays.stream(sc.nextLine().trim().split("\\s+")).mapToInt(Integer::valueOf).toArray
();}protected long[]lineToLongArray()throws IOException{return Arrays.stream(sc.nextLine
().trim().split("\\s+")).mapToLong(Long::valueOf).toArray();}protected String joinToString
(final int[]a){return Arrays.stream(a).mapToObj(Integer::toString).collect(Collectors
.joining(" "));}protected String joinToString(final long[]a){return Arrays.stream
(a).mapToObj(Long::toString).collect(Collectors.joining(" "));}@Deprecated protected
String intArrayToString(final int[]a){return joinToString(a);}@Deprecated protected
String longArrayToString(final long[]a){return joinToString(a);}protected<T>String
joinToString(final T[]a){return Arrays.stream(a).map(v->v.toString()).collect(Collectors
.joining(" "));}protected<T>String joinToString(final T[]a,final Function<T,String>
toString){return Arrays.stream(a).map(v->v.toString()).collect(Collectors.joining
(" "));}protected<T>String joinToString(final Collection<T>a){return a.stream().map
(v->v.toString()).collect(Collectors.joining(" "));}protected<T>String joinToString
(final Collection<T>a,final Function<T,String>toString){return a.stream().map(v->
toString.apply(v)).collect(Collectors.joining(" "));}@Deprecated protected List<Long>
longArrayToList(final long[]a){return Arrays.stream(a).mapToObj(Long::valueOf).collect
(Collectors.toList());}@Deprecated protected List<Integer>intArrayToList(final int
[]a){return Arrays.stream(a).mapToObj(Integer::valueOf).collect(Collectors.toList
());}protected List<Long>intArrayToLongList(final int[]a){return Arrays.stream(a
).mapToObj(Long::valueOf).collect(Collectors.toList());}protected List<Integer>toList
(final int[]a){return Arrays.stream(a).mapToObj(Integer::valueOf).collect(Collectors
.toList());}protected List<Long>toList(final long[]a){return Arrays.stream(a).mapToObj
(Long::valueOf).collect(Collectors.toList());}protected void run()throws IOException
{boolean done=false;if(nameIn !=null){try{try(FileInputStream fis=new FileInputStream
(nameIn);PrintWriter pw0=select_output();){done=true;sc=new Scanner(fis);pw=pw0;
process();}}catch(IOException ex){}}if(!done){try(PrintWriter pw0=select_output(
);){sc=new Scanner(System.in);pw=pw0;process();}}}private PrintWriter select_output
()throws FileNotFoundException{if(nameOut !=null){return new PrintWriter(nameOut
);}return new PrintWriter(System.out);}}
//end net/leksi/contest/Solver.java
}