def resolve():

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

	p = [0]*n

	for _ in range(k):

		eval(input())

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

		for i in t:

			p[i-1] += 1

	ans = 0

	for i in p:

		if i == 0:

			ans += 1

	print(ans)

resolve()
def resolve():

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

	s = [False]*n

	for i in range(k):

		eval(input())

		for j in list(map(int, input().split())):

			s[j-1] = True

	print((s.count(False)))

resolve()
def resolve():
    n, k = list(map(int, input().split()))
    p = [0] * n
    for _ in range(k):
        eval(input())
        t = list(map(int, input().split()))
        for i in t:
            p[i - 1] += 1
    ans = 0
    for i in p:
        if i == 0:
            ans += 1
    print(ans)


resolve()

def resolve():
    n, k = list(map(int, input().split()))
    s = [False] * n
    for i in range(k):
        eval(input())
        for j in list(map(int, input().split())):
            s[j - 1] = True
    print((s.count(False)))


resolve()

-    p = [0] * n -    for _ in range(k): +    s = [False] * n +    for i in range(k): -        t = list(map(int, input().split())) -        for i in t: -            p[i - 1] += 1 -    ans = 0 -    for i in p: -        if i == 0: -            ans += 1 -    print(ans) +        for j in list(map(int, input().split())): +            s[j - 1] = True +    print((s.count(False)))