program sample
    implicit none
    integer::N, L, S, i, aji
    read(*,*) N, L
    S = N*L + N*(N+1)/2 - N

    do i = 1, N
        aji = L + i - 1
        if(aji >= 0) then
            exit
        end if
    end do
    write(*,*) S - aji

    stop

end program sample