

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.*;
import java.util.*;
import java.io.BufferedReader;
import java.math.BigInteger;
public class Fooy2
{
	static int max=1000000007;
	public static void main(String[] args)throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int t=Integer.parseInt(st.nextToken());
        /*String s=String.valueOf(t);
        long sum=t;
        int t1=t;
        int k=s.length();
        while (k>1) {
        	int sum1=0;
        	while (t1>0) {
        		sum1+=t1%10;
        		t1=t1/10;
        	}
        	//System.out.println(sum1);
        	String s1=String.valueOf(sum1);
        	k=s1.length();
        	t1=sum1;
        	sum=sum1;
        }
        if(sum==2 || sum==3 || sum== 5 || sum==7)
        System.out.println(0);
    	else
    		System.out.println(1);*/
    	if(t%2==0)
    		System.out.println(0);
    	else
    		System.out.println(1);
    }
}

