lis:: [[Int]] -> Int -> Int
lis [] n= 0
lis(xs:xss) n = contiene xs n+lis xss n
contiene:: [Int] -> Int -> Int
contiene [] n = 0
contiene(x:xs) n
| n == x = n + contiene xs n
| otherwise = contiene xs n
main = do
let l = [[2,6,1,2,7],[3,8,9,2,1],[2,4,6]]
print(lis l 2)