in1=gets.chomp.split(" ").map(&:to_i)
n=in1[0]
l=in1[1]
array=[]

num=0
for i in 0...n do
array.push(l+i)
end
 min=array[0].abs
 index=0
for i in 0...n do
 if array[i].abs<min
  min=array[i].abs
  index=i
 end
end
array.delete_at(index)
for i in 0...n-1 do
 num=num+array[i]
end
puts num
