N, L = gets.split.map(&:to_i)

apples = []

N.times do |i|
  apples << L + i
end

if apples[0] < 0 && apples[N-1] < 0
  ans = apples[0..-2].inject(:+)
elsif apples[0] < 0 && apples[N-1] >= 0
  ans = apples[0..-1].inject(:+)
else
  ans = apples[1..-1].inject(:+)
end

puts ans