import Control.Monad

toInt :: String -> Int
toInt = read :: String -> Int

solve :: [Int] -> Int
solve l = div (a - b) 2
  where
    a = sum . map (\l -> product l) . sequence $ [l, l]
    b = sum . map (\x -> x * x) $ l

main = do
  n <- toInt <$> getLine
  d <- map toInt . words <$> getLine
  print $ solve d
