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

l = [0]*n

# print(k)



for i in range(k):

    for j in range(1):

        _ = eval(input())

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

        for t in tl:

            l[t-1]+=1

        # print(i,j)

ans = 0

for i in l:

    if i ==0:

        ans +=1



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

dp = [0]*n

for i in range(k):

    d = int(eval(input()))

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

    for i in A:

        dp[i-1] +=1



print((dp.count(0)))
n, k = list(map(int, input().split()))
l = [0] * n
# print(k)
for i in range(k):
    for j in range(1):
        _ = eval(input())
        tl = list(map(int, input().split()))
        for t in tl:
            l[t - 1] += 1
        # print(i,j)
ans = 0
for i in l:
    if i == 0:
        ans += 1
print(ans)

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

-l = [0] * n -# print(k) +dp = [0] * n -    for j in range(1): -        _ = eval(input()) -        tl = list(map(int, input().split())) -        for t in tl: -            l[t - 1] += 1 -        # print(i,j) -ans = 0 -for i in l: -    if i == 0: -        ans += 1 -print(ans) +    d = int(eval(input())) +    A = list(map(int, input().split())) +    for i in A: +        dp[i - 1] += 1 +print((dp.count(0)))