import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	}
} Main public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	} main {
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int str = scan.nextInt(); str scan.nextInt() scan.nextInt scan int input=str+2; input str+2 str 2 int output=0; output 0 if(input%2==0){
        output=1;
      } input%2==0 input%2 input 2 0 {
        output=1;
      } output=1 output 1 System.out.println(output) System.out.println System.out System System.out output scan.close() scan.close scan String[] args args public class Main
{
	public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	}
} public class Main
{
	public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
        Scanner scan = new Scanner(System.in);
        int str = scan.nextInt();
 
      int input=str+2;
      
      int output=0;
      
      if(input%2==0){
        output=1;
      }
      
        System.out.println(output);
        scan.close();
	}
}