N, L = STDIN.gets.chomp.split(' ').map(&:to_i)

ary = Array.new(N, 0)
ary.map!.with_index { |a, idx|
	(L + idx)
}

minIdx = 0

if L > 0
  minIdx = 0
elsif L < 0 && L.abs >= N
  minIdx = N - 1
else
  minIdx = L.abs
end

puts ary.inject(:+) - ary[minIdx]