function main(input) {
  const tmp = input.trim().split(' ').map((n) => parseInt(n, 10))
  const n = tmp[0]
  const l = tmp[1]


  if (l >= 0) {
    console.log((2 * l + n) * (n - 1) / 2)
  } else if (l + n - 1 <= 0) {
    console.log((2 * l + n - 2) * (n - 1) / 2)
  } else {
    console.log((2 * l + n - 1) * n / 2)
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
