n,l=gets.split.map &:to_i
result=[]
(1..n).each do |i|
  result<< i+l -1
end
result.sort!
sum = result.inject(:+)
if result.include?(0)
  puts sum
elsif result[-1]<0
  puts sum - result[-1]
else
  puts sum - result[0]
end