import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val l = sc.nextInt()
    val max = l + n - 1
    val sum = (0 until n).map { l + it }.sum()
    if (l <= 0 && max >= 0) {
        println(sum)
    } else if (l < 0) {
        println(sum - max)
    } else {
        println(sum - l)
    }
}