Problems
Sets Union
Sets Union
Sets union is very difficult. Therefore find the amount of numbers that present in at least one of the given sets.
Input data
The first line contains the number of sets n (1 ≤ n ≤ 10). The next n lines contain the sets in format: ka[1]
... a[k]
(1 ≤ k ≤ 1000, -10^9
≤ a[i]
≤ 10^9
).
Output data
Print the amount of numbers that present in at least one of the given sets.
Examples
Input example #1
1 1 -606037695
Output example #1
1
Input example #2
2 1 -822866455 1 503976630
Output example #2
2
Input example #3
2 3 1 2 3 3 2 4 3
Output example #3
4