from collections import Counter



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

b = []



for j in range(k):

  d = int(eval(input()))

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

  for f in a:

    b.append(f)

print((n - len(Counter(b))))    
n, k = list(map(int, input().split()))

l = [0] * n

for i in range(k):

    d = int(eval(input()))

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

    for j in range(d):

        l[x[j]-1] += 1

print((l.count(0)))
from collections import Counter

n, k = list(map(int, input().split()))
b = []
for j in range(k):
    d = int(eval(input()))
    a = list(map(int, input().split()))
    for f in a:
        b.append(f)
print((n - len(Counter(b))))

n, k = list(map(int, input().split()))
l = [0] * n
for i in range(k):
    d = int(eval(input()))
    x = list(map(int, input().split()))
    for j in range(d):
        l[x[j] - 1] += 1
print((l.count(0)))

-from collections import Counter - -b = [] -for j in range(k): +l = [0] * n +for i in range(k): -    a = list(map(int, input().split())) -    for f in a: -        b.append(f) -print((n - len(Counter(b)))) +    x = list(map(int, input().split())) +    for j in range(d): +        l[x[j] - 1] += 1 +print((l.count(0)))