'use strict'

function Main(input) {
  const N = Number(input.split(" ")[0])
  const L = Number(input.split(" ")[1])
  let ans = 0

  const list = []
  for(let i=1; i<=N; i++) {
    list.push(i+L-1)
  } 
  
  let minimum = 1000
  let plus = true
  let total = 0
  for(const num of list) {
    if(minimum > Math.abs(num)) {
      minimum = Math.abs(num)
      if(num > 0) {
        plus = true
      } else {
        plus = false
      }
    }
    total += num
  }

  if(plus) {
    console.log(total - minimum)
  } else {
    console.log(total + minimum)
  }

}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim())