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

    read*, n,l

    allocate(t(n), tot(n))

    do i=1,n
        t(i) = l+i-1
    end do

    if (t(1) < 0 .and. t(n) > 0) then
        print*, sum(t)
    else if (t(1) > 0) then
        print*, sum(t) - t(1)
    else
        print*, sum(t) - t(n)
    end if

end program BiiteEating