module Main where
import Debug.Trace
main = do
  n:l:_ <- map read . words <$> getLine
  print $ solve n l
  return ()

solve :: Int -> Int -> Int
solve n l = sum [l .. l + n - 1] - minAbs
  where
    minAbs = loop l [l .. l + n - 1]
    loop k (x:xs)
      | abs k > abs x = loop x xs
    loop k (_:xs) = loop k xs
    loop k [] = k
      
