n,l = gets.split.map(&:to_i)
array=[]
array_abs=[]
(1..n).each do |i|
  array.push(l+i-1)
end

array.each do |a|
  array_abs.push(a.abs)
end

ary = [array_abs, array].transpose

ary = ary.sort {|a,b| a[0] <=> b[0]}

ary.delete_at(0)

sum=0
ary.each do |a|
  sum+=a[1]
end

p sum

