#include<iostream>
using namespace std;
int main()
{
int x,y,i,m=0,sum=0;
cin>>x>>y;
if(x>y)
swap (x,y);
for(i=x+1;i<y;i++)
{
sum=sum+i;
if(i%2==0)
{m=m+i;}
else m=m;
}
printf("%d\n",(sum-m));
return 0;
}