program B
    implicit none
    integer :: N, L, m = 1000000, mi = 0, sum = 0, i, num
    read*,N, L
    do i = 0 , N - 1, 1
        num = L + i
        sum = sum + num
        if (abs(num) < m) then
            m = abs(num)
            mi = num
        endif
    enddo
    print*, sum - mi
end program B