object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val N, L = sc.nextInt

    val apples = (L until L + N).toArray
    val result = if (L > 0) {
      apples.tail.sum
    } else if (L < 0 && 0 < L + N - 1) {
      apples.sum
    } else {
      apples.dropRight(1).sum
    }

    println(result)
  }
}