import Data.List

main = do
    [n,l] <- map read.words <$> getLine
    putStrLn.show.answer $ map (taste l) $  take n [1..]

answer xs = sum xs - foldl f 100 xs

f v x = if abs x < abs v then x else v

taste l i = l+i-1