import scala.io.StdIn._

object Main extends App {

  val arr = readLine().split(" ").map(_.toInt)
  val n = arr(0)
  val l = arr(1)
  val ajiArr: Array[Int] = Array.fill(n)(0)
  for(i <- 0 until n){ ajiArr(i) = l + i }
  val removedOne = ajiArr(n-1) match {
    case i if i < 0  => i
    case i if i == 0 => 0
    case _           => ajiArr(0)
  }
  val result = ajiArr.sum - removedOne
  println(result)
}