import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n, l] <- getIntList
    print $ solve n l

solve n l | l <= 0 && l+n-1 >=0 = sum [l..(l+n-1)]
          | l + n - 1 < 0 = sum [l.. (l+n-2)]
          | otherwise = sum [(l+1)..(l+n-1)]