import Control.Applicative
import Control.Monad
import Data.List

main = do
  [n, l] <- map (read::String -> Int) . words <$> getLine
  let index = 1 - l
      score = foldl (+) 0 $ map (\i -> l + i - 1) [1..n]
      ans = if index >= 1 && index <= n then score
            else if l < 0 then score - (l + n - 1)
            else score - l
  print ans
  