function Main(input) {
	input = input.split(' ');
	var a = parseInt(input[0]);
	var b = parseInt(input[1]);
	var ret = a*b+a*(a-1)/2;
	if(b*(a+b-1) <= 0)console.log('%d', ret);
	else if(Math.abs(b) < Math.abs(a+b-1))console.log('%d', ret-b);
	else console.log('%d', ret-(a+b-1));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));