Sets union is very difficult. Therefore find the amount of numbers that present in at least one of the given sets.
The first line contains the number of sets n (1 ≤ n ≤ 10). The next n lines contain the sets in format: k a[1]
... a[k]
(1 ≤ k ≤ 1000, -10^9
≤ a[i]
≤ 10^9
).
Print the amount of numbers that present in at least one of the given sets.