def main():

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

    snack = set()

    for _ in range(k):

        eval(input())

        a = set(list(map(int, input().split())))

        snack |= a

    print((n-len(snack)))

        



if __name__ == "__main__":

    main()
def main():

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

    sunukes = set()

    for _ in range(k):

        eval(input())

        sunukes |= set(list(map(int, input().split())))

    print((n-len(sunukes)))



if __name__ == "__main__":

    main()
def main():
    n, k = list(map(int, input().split()))
    snack = set()
    for _ in range(k):
        eval(input())
        a = set(list(map(int, input().split())))
        snack |= a
    print((n - len(snack)))


if __name__ == "__main__":
    main()

def main():
    n, k = list(map(int, input().split()))
    sunukes = set()
    for _ in range(k):
        eval(input())
        sunukes |= set(list(map(int, input().split())))
    print((n - len(sunukes)))


if __name__ == "__main__":
    main()

-    snack = set() +    sunukes = set() -        a = set(list(map(int, input().split()))) -        snack |= a -    print((n - len(snack))) +        sunukes |= set(list(map(int, input().split()))) +    print((n - len(sunukes)))