import sys

input = sys.stdin.readline



def main():

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



    li = []



    for i in range(k):

        d = int(eval(input()))

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



        li += a_li



    print((n - len(set(li))))



if __name__ == '__main__':

    main()

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



li = []



for i in range(k):

    d = int(eval(input()))

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

    li += a_li



print((n - len(set(li))))

import sys

input = sys.stdin.readline


def main():
    n, k = list(map(int, input().split()))
    li = []
    for i in range(k):
        d = int(eval(input()))
        a_li = list(map(int, input().split()))
        li += a_li
    print((n - len(set(li))))


if __name__ == "__main__":
    main()

n, k = list(map(int, input().split()))
li = []
for i in range(k):
    d = int(eval(input()))
    a_li = list(map(int, input().split()))
    li += a_li
print((n - len(set(li))))

-import sys - -input = sys.stdin.readline - - -def main(): -    n, k = list(map(int, input().split())) -    li = [] -    for i in range(k): -        d = int(eval(input())) -        a_li = list(map(int, input().split())) -        li += a_li -    print((n - len(set(li)))) - - -if __name__ == "__main__": -    main() +n, k = list(map(int, input().split())) +li = [] +for i in range(k): +    d = int(eval(input())) +    a_li = list(map(int, input().split())) +    li += a_li +print((n - len(set(li))))