import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
if (a%4 == 0){ //4์๋ฐฐ์์ด๊ณ
if (a%100 != 0){
System.out.printf("1");
}
else if (a%400 == 0){
System.out.printf("1");
}
else {
System.out.printf("0");
}
}
else
System.out.printf("0");
}
}โ
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
System.out.println((a%4 == 0) ?((a%400 == 0) ? "1" : (a%100 == 0 ) ? "0" : "1") : "0");
}
}