int main(){
int i=0,j=0; long int sum=0; scanf("%d %d",&i,&j); int g=i+j-1; sum=((g+1)*g)/2; if(g%2==0) sum-=(g-i); else if(g%2!=0) sum-=(i-1); printf("%d",sum);
}