import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



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

aa = []

for i in range(k):

    d = int(readline())

    aa += list(map(int, readline().split()))

aa = set(list(aa))

cnt = 0

for i in range(1, n + 1):

    if i not in aa:

        cnt += 1

print(cnt)

import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

sys.setrecursionlimit(10 ** 7)



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

aa = []

for i in range(k):

    readline()

    aa += list(map(int, readline().split()))

cnt = 0

for i in range(1, n + 1):

    if i not in aa:

        cnt += 1

print(cnt)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k = list(map(int, readline().split()))
aa = []
for i in range(k):
    d = int(readline())
    aa += list(map(int, readline().split()))
aa = set(list(aa))
cnt = 0
for i in range(1, n + 1):
    if i not in aa:
        cnt += 1
print(cnt)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**7)
n, k = list(map(int, readline().split()))
aa = []
for i in range(k):
    readline()
    aa += list(map(int, readline().split()))
cnt = 0
for i in range(1, n + 1):
    if i not in aa:
        cnt += 1
print(cnt)

-    d = int(readline()) +    readline() -aa = set(list(aa))