n, l = gets.split.map(&:to_i)
apples = Array.new
n.times do |i|
  apples[i] = l + i
end
min = 0
if apples.max < 0
  min = apples.max 
elsif apples.min > 0
  min = apples.min
else
  min = 0
end
puts (apples.inject(:+) - min)