n, l = gets.split(' ').map(&:to_i)

if l >= 0 then
    sum = (l+1..l+n-1).to_a.inject(&:+)
elsif l < 0 then
    if l+n >= 0 then
        sum = (l..l+n-1).to_a.inject(&:+)
    else
        sum = (l..l+n-2).to_a.inject(&:+)
    end
end

print sum