#include int main(void) { long long int a, l, count=0, i; scanf("%lld %lld", &a, &l); for(i=a;i<=l;i++){ count++; } long long int sum = (count*0.5)*(a+l); printf("%lld\n", sum); return 0; }