import scala.math._

object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, l = sc.nextInt

  val range = 1 to n
  val ans = range.map(l + _ - 1).sortBy(abs).tail.sum

  println(ans)
}