'use strict'
// L+i−1
function main(input) {
  input = input.split(' ')
  let apples = []
  let min = Number.MAX_SAFE_INTEGER
  const N = ~~input[0]
  const L = ~~input[1]

  for (let i = 0; i < N; i++) {
    if (Math.abs(L + i) < Math.abs(min)) {
      min = L + i
    }
    apples.push(L + i)
  }
  console.log(apples.reduce((a, b) => a + b) - min)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))