n,l = gets.chomp.split(" ").map(&:to_i)
apple = []
n.times do |i|
  apple.push(l+i)
end
minus = 0
if l<0 && l+n-1<=0
  minus = l+n-1
elsif l<0 && l+n-1>0
  minus = 0
else
  minus = l
end

puts apple.inject(:+) - minus