n, k = list(map(int, input().split()))
have_candy = [False] * n
for i in range(k):
    d = int(input())
    x = list(map(int, input().split()))
    for i in x:
        have_candy[i - 1] = True
print(n - sum(have_candy))

35a5f9031e2ae8b8f6433655cb48b0bd9b4f1858
<mask token>

<mask token>
for i in range(k):
    d = int(input())
    x = list(map(int, input().split()))
    for i in x:
        have_candy[i - 1] = True
print(n - sum(have_candy))

n, k = list(map(int, input().split()))
have_candy = [False] * n
for i in range(k):
    d = int(input())
    x = list(map(int, input().split()))
    for i in x:
        have_candy[i - 1] = True
print(n - sum(have_candy))
