function main(input) {
  var data = input.split(" ");

  const N = data[0];
  const L = data[1];

  var tasteAll = 0;

  var min = 100000;
  var tasteShort = 0;
  var tempTaste = 0;

  for(i = 1; i <= Number(N); i++){
    tempTaste =  Number(L) + i - 1;
    tasteShort += tempTaste;

    if(min > abs(tempTaste)){
      min = abs(tempTaste);
      var j = i;
    }
  }

  tasteShort -= Number(L) + j - 1;

  console.log(tasteShort);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

function abs(val){
  if(val < 0){val = -val;}
  return val;
}
