object Main {

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

    val N, L = sc.nextInt()

    val min = (1 to N). map { i =>
      L + i - 1
    }. minBy(v => Math.abs(v))

    val sum = (1 to N). map { i =>
      L + i - 1
    }. sum

    println(sum - min)
  }

}