import scala.io.StdIn

object Main extends App {
  val inputs = StdIn.readLine().split(" ")
  val N = inputs(0).toInt
  val L = inputs(1).toInt

  val min = L + 1 - 1
  val max = L + N - 1

  val eat = (min to max).minBy(i => i.abs)



  println((min to max).sum - eat)
}