program bite_eating
  implicit none
  integer :: n, l, m, s, i
  read(*,*) n, l
  m = 1000000
  s = 0
  do i = 1, n
    if (abs(m).gt.abs(l+i-1)) m = l+i-1
    s = s+l+i-1
  end do
  write(*,'(i0)') s-m
  stop
end program bite_eating