

Input

The input contains a single integer a (10 ≤ a ≤ 999).

Output

Output 0 or 1.

Examples

Input

13


Output

1


Input

927


Output

1


Input

48


Output

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

public class problem1 {
    public static void main(String[] args) throws IOException{
        Input.init( System.in );
        PrintWriter out = new PrintWriter(System.out);
        
        int a = Input.nextInt();
        
        
        if(a % 2 == 1){
             out.println(1);
        }else
        
        out.println(0);
        
        
        
        
        
        
        
        out.close();
    }
}














//THIS IS A FAST READER
class Input {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    /** call this method to initialize reader for InputStream */
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

    /** get next word */
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            //TODO add check for eof if necessary
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
	
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
}