def main():

    n,k = tuple([int(t)for t in input().split()])



    t = [0]*n

    for _ in range(k):

        eval(input())

        k = tuple([int(t)-1 for t in input().split()])

        for k_i in k:

            t[k_i]+=1

    

    ans = 0

    for t_i in t:

        if t_i==0:

            ans+=1

    print(ans)



if __name__ == "__main__":

    main()
n,k = tuple(map(int,input().split()))

ans = [1]*n

for i in range(k):

  d = int(eval(input()))

  a_i = tuple(map(int,input().split()))

  for a_ij in a_i:

    ans[a_ij-1] = 0

    

print((sum(ans)))

    
def main():
    n, k = tuple([int(t) for t in input().split()])
    t = [0] * n
    for _ in range(k):
        eval(input())
        k = tuple([int(t) - 1 for t in input().split()])
        for k_i in k:
            t[k_i] += 1
    ans = 0
    for t_i in t:
        if t_i == 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

n, k = tuple(map(int, input().split()))
ans = [1] * n
for i in range(k):
    d = int(eval(input()))
    a_i = tuple(map(int, input().split()))
    for a_ij in a_i:
        ans[a_ij - 1] = 0
print((sum(ans)))

-def main(): -    n, k = tuple([int(t) for t in input().split()]) -    t = [0] * n -    for _ in range(k): -        eval(input()) -        k = tuple([int(t) - 1 for t in input().split()]) -        for k_i in k: -            t[k_i] += 1 -    ans = 0 -    for t_i in t: -        if t_i == 0: -            ans += 1 -    print(ans) - - -if __name__ == "__main__": -    main() +n, k = tuple(map(int, input().split())) +ans = [1] * n +for i in range(k): +    d = int(eval(input())) +    a_i = tuple(map(int, input().split())) +    for a_ij in a_i: +        ans[a_ij - 1] = 0 +print((sum(ans)))