program main
  implicit none
  integer :: n, l, i, ma, res
  integer, allocatable :: ringos(:)
  read (*, *) n, l
  allocate (ringos(n))
  do i = 1, n
    ringos(i) = l + i - 1
  end do
  ma = minval(abs(ringos))
  do i = 1, n
    if (abs(ringos(i)) == ma) ringos(i) = 0
  end do
  write (*, "(i0)") sum(ringos)
end program main
