program sample
  implicit none

  integer :: N, L, a, b

  read(*,*) N, L

  if (-100<= L.and.L <=-1) then
     a = 1-L
  else
     a = 1
  end if

  b=(N*N+(2*L-1)*N)/2-L-a+1

  write(*,*) b

  stop
end program sample
