import Data.List
main = do
  [n,l] <- map (read::String->Int) . words <$> getLine
  let apples = take n [l..]
  print $ sum [applePie|let x = minimumAbs apples, applePie<-delete x apples]

--リストの中で絶対値が一番小さい値を返す
minimumAbs = foldl1 minAbs 
minAbs x y
  |(abs x) < (abs y) = x
  |otherwise         = y