func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let suuji = readInts()
let n = suuji[0]
let l = suuji[1]
var sum = 0
var min = l
for i in 2...n {
  var b = l + i - 1
  sum+=b
  if (abs(b)<abs(min)) {
    sum-=b
    sum+=min
  }
}
print(sum)