import numpy as np

N, K = list(map(int, input().split()))

 

A = np.zeros(N, dtype=int)

 

for _ in range(K):

    eval(input())

    for i in input().split():

        A[int(i) - 1] += 1

 

ans = 0

for i in A:

    if i == 0:

        ans += 1

print(ans)

 
N, K = list(map(int, input().split()))



A = [0] * N



for _ in range(K):

    eval(input())

    for i in map(int, input().split()):

        A[i - 1] += 1



print((A.count(0)))

import numpy as np

N, K = list(map(int, input().split()))
A = np.zeros(N, dtype=int)
for _ in range(K):
    eval(input())
    for i in input().split():
        A[int(i) - 1] += 1
ans = 0
for i in A:
    if i == 0:
        ans += 1
print(ans)

N, K = list(map(int, input().split()))
A = [0] * N
for _ in range(K):
    eval(input())
    for i in map(int, input().split()):
        A[i - 1] += 1
print((A.count(0)))

-import numpy as np - -A = np.zeros(N, dtype=int) +A = [0] * N -    for i in input().split(): -        A[int(i) - 1] += 1 -ans = 0 -for i in A: -    if i == 0: -        ans += 1 -print(ans) +    for i in map(int, input().split()): +        A[i - 1] += 1 +print((A.count(0)))