import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val l = sc.nextInt()

    println(abc131b(n, l))
}

private fun abc131b(n: Int, l: Int): Int {
    val apples = (1..n).map { l + it - 1 }
    val ans = apples.sortedBy { Math.abs(it) }.drop(1).sum()

    return ans
}
