function main(input) {
  const args = input.split(' ')
  let N = Number(args[0])
  let L = Number(args[1])
  let azi_sum = 0
  let min_abs = 1000000
  for (let i = 1; i <= N; i++) {
    let azi = L + i - 1
    if (min_abs * min_abs > azi * azi) {
      min_abs = azi
    }
    azi_sum += azi
  }
  azi_sum -= min_abs
  console.log(`${azi_sum}`)
}

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