import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)

  val n = sc.nextInt
  val l = sc.nextInt

  val tastes = (0 until n ).map(l + _)
  val eaten = tastes.map(t => (Math.abs(t),t)).min
  val res = tastes.sum - eaten._2
  println(res)

}
