fun main(args: Array<String>) {
    val (N, L) = readLine()!!.split(" ").map { Integer.parseInt(it) }
    val tasteList = mutableListOf<Int>()
    for (i in 1 until N + 1) {
        tasteList.add(L + i - 1)
    }
    val tasteListAbs = tasteList.map { Math.abs(it) }
    tasteList.removeAt(tasteListAbs.indexOf(tasteListAbs.min()!!))
    print(tasteList.sum())

}
