import java.util.*
fun main(args: Array<String>){
	val cin = Scanner(System.`in`)
    val n = cin.nextInt()
    val l = cin.nextInt()
    val min = l
    val max = l + n - 1

    var ans = 0
    for (i in 0..n-1) {
        ans += l + i
    }
    if (min > 0) {
        ans -= min
    } else if (0 > max) {
        ans -= max
    }
    println(ans)
}