fun main (args : Array<String>) {
	val (n, l) = readLine()!!.split(" ").map(String::toInt)
	val N : Int = n.toInt()
	val L : Int = l.toInt()
	
	var calc : Int
	var min : Int = 0
	var result : Int = 0
	
	for (i in 1..N) {
		calc = ( (L + i) - 1 )
		result += calc
		if (calc < 0) {
			calc = -(calc)
		}
		if (i == 1) {
			min = calc
		}
		if (min > calc) {
			min = calc
		}
	}
	//println("${result}, ${min}")
	if (result > 0) {
		return println("${result - min}")
	}
	println("${result + min}")
	
}