A year $Y$ is a leap year if $Y$ is a multiple of $4$. However, there is an exception: if $Y$ is a multiple of $100$ and not a multiple of $400$, it is not a leap year.
For example, 1900 is not a leap year, but 2000 is a leap year.
Given two integers $L$ and $R$, output the number of leap years between year $L$ and $R$ (inclusive).
Input
The only line of input contains two integers $L$ and $R$.
Output
Output the number of leap years between years $L$ and $R$.
Constraints
In all subtasks, $1 \le L \le R \le 10^9$
Subtask 1 (50%): $L = 1$
Subtask 2 (50%): No additional constraints
Sample Test Cases
Input | Output | |
---|---|---|
1 1000 | 242 | |
2000 2100 | 25 |
Scoring: Per Subtask
Authored by s16f22