n, l = gets.split.map(&:to_i)
index = []
sum = 0
(0...n).each do |i|
	index[i] = l + i
end
if l >= 0
	sum = index.inject(:+) - index.min
else
	if n + l > 0
		sum = index.inject(:+)
	else
		sum = index.inject(:+) - index.max
	end
end
puts sum