program b
implicit none
integer n, l, s, i, res, num
integer,allocatable,dimension(:) :: x
read*, n, l
allocate(x(n))
s=n*(2*l+n-1)/2
 do i=1,n
 x(i)=l+i-1
 end do
res=abs(x(1))
num=1 
 do i=1,n
 if(res.gt.abs(x(i))) then
 res=abs(x(i))
 num=i
 end if
 end do
s=s-x(num)
print*, s
end program