io = STDIN
n,l=io.gets.split.map(&:to_i)
#Σ l+0,l+1,l+2,,,l+(n-1)
#l*n+(n-1)n/2
sum=l*n+(n-1)*n/2
if l<=0 && l+n-1>=0
  puts sum
elsif l>0
  puts sum-l
else      # 1+(n-1) < 0
  puts sum-(l+(n-1))
end
