program main
  implicit none

  integer :: n, l, a, i, mi = 300, su = 0

  read(*,*)n, l
  do i = 1, n
    a = l + i - 1
    if (abs(a) < abs(mi)) then
      mi = a
    end if
    su = su + a
  end do
  write(*,*)su - mi

end program main