import sys

sys.setrecursionlimit(10 ** 5 + 10)

def input(): return sys.stdin.readline().strip()



def resolve():



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

    c=[False]*n

    for i in range(k):

        d=int(eval(input()))

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

        for j in A:

            if c[j-1]==False:

                c[j-1]=True

    print((n-sum(c)))







resolve()
import sys

sys.setrecursionlimit(10 ** 5 + 10)

def input(): return sys.stdin.readline().strip()



def resolve():

    

    N,K=list(map(int,input().split()))

    S=[0]*N

    for i in range(K):

        d=int(eval(input()))

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

        for i in range(len(A)):

            S[A[i]-1]+=1

    

    print((S.count(0)))



    

resolve()
import sys

sys.setrecursionlimit(10**5 + 10)


def input():
    return sys.stdin.readline().strip()


def resolve():
    n, k = list(map(int, input().split()))
    c = [False] * n
    for i in range(k):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for j in A:
            if c[j - 1] == False:
                c[j - 1] = True
    print((n - sum(c)))


resolve()

import sys

sys.setrecursionlimit(10**5 + 10)


def input():
    return sys.stdin.readline().strip()


def resolve():
    N, K = list(map(int, input().split()))
    S = [0] * N
    for i in range(K):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for i in range(len(A)):
            S[A[i] - 1] += 1
    print((S.count(0)))


resolve()

-    n, k = list(map(int, input().split())) -    c = [False] * n -    for i in range(k): +    N, K = list(map(int, input().split())) +    S = [0] * N +    for i in range(K): -        for j in A: -            if c[j - 1] == False: -                c[j - 1] = True -    print((n - sum(c))) +        for i in range(len(A)): +            S[A[i] - 1] += 1 +    print((S.count(0)))