let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

var n = arr[0]
var l = arr[1]
var i = 0
var min : Int
var o = 0

min = abs( l )
for i in 1...n {
  o += l + i - 1
  if( abs( l + i - 1)  < abs(min) ) { min = l + i - 1   }
}

print( o - min )