Union of Sets#790

Union of Sets

1 second
128 megabytes
Very easy (≈850)

Determine the number of distinct numbers that appear in at least one of the given sets.

Input

The first line contains an integer n~(1 \le n \le 10) — the number of sets.

The next lines each describe one set: first, the number k~(1 \le k \le 1000) is given — the number of elements in the set, followed by integers a_1~...~a_k~(−10^9 \le a_i \le 10^9) — the elements of the set.

Output

Output a single number — the number of distinct elements that appear in at least one of the sets.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading