private fun readInts() = readLine()!!.split(" ").map(String::toInt)

fun main(args: Array<String>) {
    val (N, L) = readInts()
    println((0 until N).map { it + L }.sortedBy { Math.abs(it) }.drop(1).sum())
}
