#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
(a%2==0)?cout<<(b/2)-(a/2)+1<<endl:cout<<(b/2)-(a/2)<<endl;
}