get_some :: Int -> [Int] -> [[Int]]

get_some 0 _ = [[]]
get_some n (x:xs) = (map (\a -> (x:a)) (get_some (n - 1) xs)) ++ (get_some n xs)
get_some _ [] = []

judge :: [Int] -> Bool
judge x = (a + b > c) && (b + c > a) && (c + a > b) where
    a = x !! 0
    b = x !! 1
    c = x !! 2

main = do
    getLine
    getLine >>= putStrLn . show . length . (filter judge) . (get_some 3) . (map read) . words