'use strict'

function main(input){
  const NL = input.split(' ').map(x => parseInt(x));
  const N = NL[0];
  const L = NL[1];

  const apples = [];
  for(let i=1;i<=N;i++){
    apples.push(L+i-1)
  }

  const sum = apples.reduce( (a,b) => a+b,0 );

  let small_taste = apples.map(x => Math.abs(x) ).sort( (a,b) => a-b )[0]

  let smal_index = apples.findIndex(x => x==(small_taste)||x==(-1)*small_taste)
  let origin_small_number = apples[smal_index];

  let result = sum - origin_small_number;

  console.log(result);

}

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