program main
 implicit none
 integer*8 n,l,ans,i
 read(*,*) n,l
 ans = 0
 do i = l,l+n-1
  ans = ans + i
 end do
 if(l >= 0) then
  write(*,*) ans - l
 else if(l+n-1 < 0) then
  write(*,*) ans - (l+n-1)
 else
  write(*,*) ans
 end if
end program main