function Main(input){
	var inputSeparated = input.split(' ');
  	var n = inputSeparated[0];
  	var l = parseInt(inputSeparated[1]);
  	var array = [];
  	for(var i = 0;i<n;i++){
     array.push(l+i);
    }
  	console.log(array);
  	var absArray = [];
  	for(var j = 0;j<array.length;j++){
      var absNumbers = Math.abs(array[j]);
      absArray.push(absNumbers);
    }
 	var min = Math.min.apply(null, absArray);
    var sum = 0;
  	for(var k =0;k<absArray.length;k++){
     sum = sum+ absArray[k]; 
    }
  	sum = sum -min;
  	console.log(sum);
}



Main(require("fs").readFileSync("/dev/stdin", "utf8"));
