const main = (inputs) => {
  var N = inputs[0].split(" ")[0]-0;
  var L = inputs[0].split(" ")[1]-0;

  var apples = [];
  var min = 500;
  var sum = 0;
  for(var i=0;i<N;i++){
    apples.push(i+L);
    sum += i+L;
    if(Math.abs(min) > Math.abs(i+L)){
      min = i+L;
    }
  }
  console.log(sum-min);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
