import sys

input = sys.stdin.readline



n, k = [int(x) for x in input().split()]

flag = [0]*n

for _ in range(k):

    d = int(eval(input()))

    a = [int(x) for x in input().split()]

    for i in a:

        flag[i - 1] = 1

ans = 0

for i in flag:

    if not i:

        ans += 1

print(ans)









import sys

input = sys.stdin.readline



n, k = [int(x) for x in input().split()]

s = set()

for _ in range(k):

    d = int(eval(input()))

    a = [int(x) for x in input().split()]

    for i in a:

        s.add(i)

ans = 0



for i in range(n):

    if i + 1 not in s:

        ans += 1



print(ans)
import sys

input = sys.stdin.readline
n, k = [int(x) for x in input().split()]
flag = [0] * n
for _ in range(k):
    d = int(eval(input()))
    a = [int(x) for x in input().split()]
    for i in a:
        flag[i - 1] = 1
ans = 0
for i in flag:
    if not i:
        ans += 1
print(ans)

import sys

input = sys.stdin.readline
n, k = [int(x) for x in input().split()]
s = set()
for _ in range(k):
    d = int(eval(input()))
    a = [int(x) for x in input().split()]
    for i in a:
        s.add(i)
ans = 0
for i in range(n):
    if i + 1 not in s:
        ans += 1
print(ans)

-flag = [0] * n +s = set() -        flag[i - 1] = 1 +        s.add(i) -for i in flag: -    if not i: +for i in range(n): +    if i + 1 not in s: