N,L = gets.split.map(&:to_i)
all = 0
A = Array.new(N)
N.times do |i|
    A[i] = L + (i+1) - 1
    all += L + (i+1) - 1
end

if L > 0 then
    puts all - A.min
elsif A.include?(0) then
    puts all
else
    puts all - A.max
end