main :: IO ()
solve :: [Int] -> Int -> Int
solve [] res = res
solve (x:xs) res = solve xs res'
  where res' = if abs x < abs res
               then x
               else res

main = do
  [n, l] <- map read . words <$> getLine
  let tastes = map (\n -> l + n - 1) [1..n]
  print $ sum tastes - solve tastes 1000 
