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



snuke = [False] * N

for i in range(K):

    d = int(eval(input()))

    a = list(map(int, input().split()))

    for j in range(d):

        snuke[a[j] - 1] = True



ans = 0

for i in range(N):

    if not snuke[i]:

        ans += 1



print(ans)

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



snukes = [0 for _ in range(N)]

for _ in range(K):

    d = int(eval(input()))

    A = list(map(int, input().split()))

    for a in A:

        snukes[a - 1] += 1



print((snukes.count(0)))
N, K = list(map(int, input().split()))
snuke = [False] * N
for i in range(K):
    d = int(eval(input()))
    a = list(map(int, input().split()))
    for j in range(d):
        snuke[a[j] - 1] = True
ans = 0
for i in range(N):
    if not snuke[i]:
        ans += 1
print(ans)

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

-snuke = [False] * N -for i in range(K): +snukes = [0 for _ in range(N)] +for _ in range(K): -    a = list(map(int, input().split())) -    for j in range(d): -        snuke[a[j] - 1] = True -ans = 0 -for i in range(N): -    if not snuke[i]: -        ans += 1 -print(ans) +    A = list(map(int, input().split())) +    for a in A: +        snukes[a - 1] += 1 +print((snukes.count(0)))