eolymp
bolt
Try our new interface for solving problems
Problems

Sets Union

Sets Union

Time limit 1 second
Memory limit 128 MiB

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 (1n10). The next n lines contain the sets in format: ka[1] ... a[k] (1k1000, -10^9a[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