main :: IO ()
main = do
  [n, l] <- map read . words <$> getLine
  print $ solve n l

solve :: Int -> Int -> Int
solve n l = sum [l .. r] - a
  where
    r = l + n - 1
    a | l >= 0    = l
      | r <= 0    = r
      | otherwise = 0