program BiiteEating
    implicit none
    integer(4)::n, l, i, imin
    integer(4),allocatable:: t(:)

    read*, n,l

    allocate(t(n))
    imin = 1
    do i=1,n
        t(i) = l+i-1
        if (abs(t(i)) < abs(t(imin))) imin = i
    end do

    print*, sum(t) - t(imin)

end program BiiteEating