import Data.Bits
import Data.List
import Control.Monad
import qualified Data.Vector.Unboxed as V
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Lazy.Char8 as B
import Debug.Trace

main :: IO ()
main = do
  [n,l] <- map read.words <$> getLine :: IO [Int]
  
  let as = sortOn abs [l + i - 1| i <- [1..n]]
  print $ sum (tail as)
