local N, L = io.read("n", "n")
local abs_min_i
local abs_min = 1000
local sum = 0
for i=1,N do
    local taste = L + i - 1
    local a = math.abs(taste)
    if a < abs_min then
        abs_min_i = i
        abs_min = a
    end
    sum = sum + taste
end
sum = sum - (L + abs_min_i - 1)
print(sum)
