#AC
n,l = gets.chomp.split(' ').map(&:to_i)
apples = (l...(l+n)).to_a
if apples.first * apples.last <= 0
  puts apples.sum
elsif apples.last < 0
  puts apples.sum - apples.last
else
  puts apples.sum - apples.first
end