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()))

    a = set()

    for i in range(k):

        eval(input())

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

    print((n-len(a)))



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()))
    a = set()
    for i in range(k):
        eval(input())
        a |= set(list(map(int, input().split())))
    print((n - len(a)))


if __name__ == "__main__":
    main()

-    sunukes = set() -    for _ in range(k): +    a = set() +    for i in range(k): -        sunukes |= set(list(map(int, input().split()))) -    print((n - len(sunukes))) +        a |= set(list(map(int, input().split()))) +    print((n - len(a)))