object Main extends App {
  var get = readLine.split(" ")
  var n = get(0).toInt
  var l = get(1).toInt
  var sum = 0
val inputs = List.tabulate(n)(i => (l + i))
  sum = inputs.sum
  if(l>0)sum = sum-inputs.min
  if(l<0){
    if(n.abs<l.abs)sum = sum-inputs.max
  }
  println(sum)
}