import java.lang.Math

fun main(args: Array<String>)
{
    val (n, l) = readNInts()

    val aji = mutableListOf<Int>()
    for (i in 1..n) {
        aji.add(l + i - 1)
    }

    var nearest = 100000
    var idx = -1
    for (i in 0..n-1) {
        if (Math.abs(nearest) > Math.abs(aji[i])) {
            nearest = aji[i]
            idx = i
        }
    }

    var ans = 0
    for (i in 0..n-1) {
        if (i == idx) continue
        ans += aji[i]
    }

    println(ans)

}


// Read an integer
// Usage: val a = readInt()
private fun readInt() = readLine()!!.toInt()

// Read N integers separated by " "
// Usage: val (a, b, c) = readNInts()
private fun readNInts() = readLine()!!.split(" ").map(String::toInt)

// Read a string
// Usage: val a = readString()
private fun readString() = readLine()!!
