from statistics import median

#import collections

#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]

from fractions import gcd

from itertools import combinations # (string,3) 3回

from collections import deque

from collections import defaultdict

import bisect

#

#    d = m - k[i] - k[j]

#    if kk[bisect.bisect_right(kk,d) - 1] == d:

#

#

#

# pythonで無理なときは、pypyでやると正解するかも！！

#

#



import sys

sys.setrecursionlimit(10000000)

mod = 10**9 + 7



def readInts():

  return list(map(int,input().split()))

def main():

    n,k = readInts()

    LIST = [0] * n

    for i in range(k):

        d = int(eval(input()))

        A = readInts()

        for i in range(d):

            LIST[A[i]-1] = 1

    cnt = 0

    for i in range(n):

        if LIST[i] == 0:

            cnt += 1

    print(cnt)

if __name__ == '__main__':

  main()

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

hito = set()

for i in range(k):

    d = int(eval(input()))

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

    for j in range(len(oka)):

        hito.add(oka[j])

print((n - len(hito)))

from statistics import median

# import collections
# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations  # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect

#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
import sys

sys.setrecursionlimit(10000000)
mod = 10**9 + 7


def readInts():
    return list(map(int, input().split()))


def main():
    n, k = readInts()
    LIST = [0] * n
    for i in range(k):
        d = int(eval(input()))
        A = readInts()
        for i in range(d):
            LIST[A[i] - 1] = 1
    cnt = 0
    for i in range(n):
        if LIST[i] == 0:
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

n, k = list(map(int, input().split()))
hito = set()
for i in range(k):
    d = int(eval(input()))
    oka = list(map(int, input().split()))
    for j in range(len(oka)):
        hito.add(oka[j])
print((n - len(hito)))

-from statistics import median - -# import collections -# aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] -from fractions import gcd -from itertools import combinations  # (string,3) 3回 -from collections import deque -from collections import defaultdict -import bisect - -# -#    d = m - k[i] - k[j] -#    if kk[bisect.bisect_right(kk,d) - 1] == d: -# -# -# -# pythonで無理なときは、pypyでやると正解するかも！！ -# -# -import sys - -sys.setrecursionlimit(10000000) -mod = 10**9 + 7 - - -def readInts(): -    return list(map(int, input().split())) - - -def main(): -    n, k = readInts() -    LIST = [0] * n -    for i in range(k): -        d = int(eval(input())) -        A = readInts() -        for i in range(d): -            LIST[A[i] - 1] = 1 -    cnt = 0 -    for i in range(n): -        if LIST[i] == 0: -            cnt += 1 -    print(cnt) - - -if __name__ == "__main__": -    main() +n, k = list(map(int, input().split())) +hito = set() +for i in range(k): +    d = int(eval(input())) +    oka = list(map(int, input().split())) +    for j in range(len(oka)): +        hito.add(oka[j]) +print((n - len(hito)))