import java.util.*

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

    val tastes = (1..n).map { l + it - 1 }
    val zm = tastes.minBy { Math.abs(it) }
    val result = tastes.sum() - zm!!
    print(result)
}
