import scala.io.StdIn


object Main extends App {
  val Array(n, l)  = StdIn.readLine.toString.split(" ").map(_.toInt)

  def solve(n: Int, l: Int) : Int  = {

    val ls = (1 to n).map(l + _ -1)
    var m = Int.MaxValue

    ls.foreach {i =>
      if (Math.abs(m) > Math.abs(i))
        m = i
    }
    ls.sum - m
  }
  println(solve(n, l))

}
  

