main :: IO ()
main = do
  [n,l] <- map (read :: String -> Int) . words <$> getLine
  print $ ans n l

ans :: Int -> Int -> Int
ans n l
  | l < 0 && 0 < (l+n-1) = s
  | l >= 0 = s-l
  | l+n-1 <= 0 = s-(l+n-1)
  where s = (`div` 2) $ n*(2*l+n-1)