#ABC166B. [ABC166B] Trick or Treat

[ABC166B] Trick or Treat

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 200200 points

Problem Statement

NN Snukes called Snuke 11, Snuke 22, ..., Snuke NN live in a town.

There are KK kinds of snacks sold in this town, called Snack 11, Snack 22, ..., Snack KK. The following did_i Snukes have Snack ii: Snuke Ai,1,Ai,2,⋯ ,Ai,diA_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.

Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Constraints

  • All values in input are integers.
  • 1≤N≤1001 \leq N \leq 100
  • 1≤K≤1001 \leq K \leq 100
  • 1≤di≤N1 \leq d_i \leq N
  • 1≤Ai,1<⋯<Ai,di≤N1 \leq A_{i, 1} < \cdots < A_{i, d_i} \leq N

Input

Input is given from Standard Input in the following format:

NN KK

d1d_1

A1,1⋯A1,d1A_{1, 1} \cdots A_{1, d_1}

⋮\vdots

dKd_K

AK,1⋯AK,dKA_{K, 1} \cdots A_{K, d_K}

Output

Print the answer.

3 2
2
1 3
1
3
1
  • Snuke 11 has Snack 11.
  • Snuke 22 has no snacks.
  • Snuke 33 has Snack 11 and 22.

Thus, there will be one victim: Snuke 22.

3 3
1
3
1
3
1
3
2