
main = do 
    [n, l] <- map (read :: String -> Int). words <$> getLine
    let result = if 0 < l 
        then 
            1 
        else 
            if n < (1 -l )
                then
                    n
                else 
                    1 - l 
    
    print $ ( div ( n * (n + 1 ) ) 2 ) - n +  n * l  - ( l + result - 1 )

