

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.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;


public class Main {
	public static void main(String[] args){
		InputStream inputStream=System.in;
		OutputStream outputStream=System.out;
		InputReader in=new InputReader(inputStream);
		PrintWriter out=new PrintWriter(outputStream);
		Solve solve=new Solve();
		solve.mmain(in, out);
		out.close();
	}
	static class Solve{
		static final int maxn=10024;
		public void mmain(InputReader in,PrintWriter out){
			int a;
			a=in.nextInt();
			if(a%2==1) out.print(1);
			else out.print(0);
			
			
			
		}
	}
	static class InputReader{
		public BufferedReader reader;
		public StringTokenizer tokenizer;
		public InputReader(InputStream stream){
			reader=new BufferedReader(new InputStreamReader(stream));
			tokenizer=null;
		}
		public String next(){
			while(tokenizer==null||!tokenizer.hasMoreTokens()){
				try{
					tokenizer=new StringTokenizer(reader.readLine());
				}catch (Exception e){
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt(){
			return Integer.parseInt(next());
			
		}
	}
}