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