function Main(input){
	input = input.split(" ").map(Number);
	var n = input[1];
	var m = input[0]+n-1;
	var p = 0
	if(m<0) p = m;
	else if(n>0) p = n;
	var ans = (m*(m+1)/2)-(n*(n-1)/2)-p;
	console.log(ans)
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());