'use strict'

const main = (INPUT) => {
  const input = INPUT.split('\n')[0].split(' ').map(n => Number(n))
  const N = input[0]
  const L = input[1]
  let ans = 0
  let i
  let flg
  if (L >= 0) {
    i = 1
    flg = false
  } else {
    i = 0
    flg = true
  }
  for (; i < N; i++) {
    if (L + i == 0) {
      flg = false
    } else {
      ans += L + i
    }
  }
  if (flg) {
    ans -= L + N - 1
  }
  console.log(ans)
}

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