from itertools import chain



a = list(open(0))

n = int(a[0].split()[0])

print((n - len(set(chain.from_iterable(list(map(str.split, a[2::2])))))))

R = lambda: list(map(int, input().split()))

n, k = R()

s = set()

for _ in range(k):

  R()

  s.update(R())

print((n - len(s)))

from itertools import chain

a = list(open(0))
n = int(a[0].split()[0])
print((n - len(set(chain.from_iterable(list(map(str.split, a[2::2])))))))

R = lambda: list(map(int, input().split()))
n, k = R()
s = set()
for _ in range(k):
    R()
    s.update(R())
print((n - len(s)))

-from itertools import chain - -a = list(open(0)) -n = int(a[0].split()[0]) -print((n - len(set(chain.from_iterable(list(map(str.split, a[2::2]))))))) +R = lambda: list(map(int, input().split())) +n, k = R() +s = set() +for _ in range(k): +    R() +    s.update(R()) +print((n - len(s)))