main = do
  [n, l] <- map read . words <$> getLine
  let ajis = [l .. l + n - 1]
  if 0 `elem` ajis then print (sum ajis)
    else if l > 0 then print (sum $ tail ajis)
    else print (sum $ init ajis)