def main():



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

    v = [0 for _ in range(N)]

    for _ in range(K):

        d = int(eval(input()))

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

        for u in A:

            v[u-1] += 1

    ans = 0

    for i in range(N):

        if v[i] == 0: ans += 1

    return ans



if __name__ == '__main__':

    print((main()))

def main():



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

    p = set()

    for _ in range(K):

        d = int(eval(input()))

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

        for i in range(d):

            p.add(A[i])

    return N - len(p)



if __name__ == '__main__':

    print((main()))

def main():
    N, K = list(map(int, input().split()))
    v = [0 for _ in range(N)]
    for _ in range(K):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for u in A:
            v[u - 1] += 1
    ans = 0
    for i in range(N):
        if v[i] == 0:
            ans += 1
    return ans


if __name__ == "__main__":
    print((main()))

def main():
    N, K = list(map(int, input().split()))
    p = set()
    for _ in range(K):
        d = int(eval(input()))
        A = list(map(int, input().split()))
        for i in range(d):
            p.add(A[i])
    return N - len(p)


if __name__ == "__main__":
    print((main()))

-    v = [0 for _ in range(N)] +    p = set() -        for u in A: -            v[u - 1] += 1 -    ans = 0 -    for i in range(N): -        if v[i] == 0: -            ans += 1 -    return ans +        for i in range(d): +            p.add(A[i]) +    return N - len(p)