fun main(args: Array<String>) = yorukatsu15a()

fun yorukatsu15a() {
    val (n, l) = readLine()!!.split(' ').map { it.toInt() }

    val answer = (l until l + n).sum() - (l until l + n).minBy { Math.abs(it) }!!

    println(answer)
}
