import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();

        // 년도가 4의 배수이고 100의 배수가 아니거나 400의 배수이면 윤년이다.
        if (((a % 4 == 0) && (a % 100 != 0)) || (a % 400 == 0)) {
            System.out.println(1);
        } else {
            System.out.println(0);
        }
    }
}

+ Recent posts