solution :: String -> Int solution = length . filter id . map (not . (\x -> (x==6) || (x==5)) . length) . concatMap (drop 11) . map words . lines main = interact $ show . solution