n,l = gets.chop.split.map(&:to_i)

low=l+1-1
high=l+n-1

sum=(low+high)*n/2

res=0

if (low<=0 && high>=0)
  res=sum
elsif(low>0 && high>=0)
  res=sum-low
elsif(low<=0 && high<0)
  res=sum-high
end

puts res
