import java.lang.Math.abs

fun main(args: Array<String>) {
  val (N, L) = readLine()!!.split(" ").map { it.toInt() }
  val tastes = (0 until N).map { it + L }.sortedBy { abs(it) }
  println(tastes.drop(1).sum())
}
