n, k = list(map(int, input().split()))

a = []

for i in range(k):

  d = int(eval(input()))

  a[len(a):len(a)] = list(map(int, input().split()))

list(set(a))

ans = 0

for i in range(1, n+1):

  if i not in a:

    ans += 1

print(ans)
n, k = list(map(int, input().split()))

a = []

for i in range(k):

    d = int(eval(input()))

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

a = list(set(a))

print((n-len(a)))
n, k = list(map(int, input().split()))
a = []
for i in range(k):
    d = int(eval(input()))
    a[len(a) : len(a)] = list(map(int, input().split()))
list(set(a))
ans = 0
for i in range(1, n + 1):
    if i not in a:
        ans += 1
print(ans)

n, k = list(map(int, input().split()))
a = []
for i in range(k):
    d = int(eval(input()))
    a.extend(list(map(int, input().split())))
a = list(set(a))
print((n - len(a)))

-    a[len(a) : len(a)] = list(map(int, input().split())) -list(set(a)) -ans = 0 -for i in range(1, n + 1): -    if i not in a: -        ans += 1 -print(ans) +    a.extend(list(map(int, input().split()))) +a = list(set(a)) +print((n - len(a)))