#include<bits/stdc++.h>
using namespace std;
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define int long long
int x,y;
signed main()
{
FAST_IO;
while(1)
{
cin>>x>>y;
if(x==-1&&y==-1) break;
cout<<(x+y)*(y-x+1)/2<<'\n';
}
return 0;
}