#include <bits/stdc++.h>
using namespace std;
int n(int i)
{
if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0)
{
return true;
}
else
{
return false;
}
}
int main()
{
int a, b, s = 0;
cin >> a >> b;
for (int i = a; i <= b; i++)
{
if (n(i))
{
s++;
}
}
cout << s;
return 0;
}
闺年满足年份被4整除且不被100整除或者被400整除。