#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int n,m;
int sum(int l, int r)
{
int cnt=0;
for (int i = l; i <=r; i ++ )
{
cnt+=i;
}
return cnt;
}
int main()
{
cin >>n>>m;
cout<<sum(n,m);
return 0;
}