
object Main extends App {
  import scala.io.StdIn._

  val Array(n, l) = readLine.trim.split(' ').map(_.toInt)
  val apples = (1 to n).map(i => l + i - 1)
  println(
    apples.sum - apples.minBy(_.abs)
  )
}
