Skip to main content
LIVE CONTEST: ALGOR Contest: Round #4 (Special Challenge) is live now!
ALGOR Contest: Round #4 (Special Challenge)
Problem C · 150 points · ICPC rules

~/algor $ cat contests/round-4/C

C. Leap year

1000 ms 64 MB

A year number $y$ is given. Check whether the statement is true: “year $y$ is a leap year”. A year is a leap year if it is divisible by $4$ and not divisible by $100$, or divisible by $400$.

A calendar sheet and a leap-year mark

Input

One positive integer $y$.

Output

One integer: $1$ if the statement is true, otherwise $0$.

Note

$1 \le y \le 10^{9}$

Examples

Input #1
2024
Output #1
1
Input #2
2023
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.