n,k=io.read("*n","*n","*l")
snuke={}
for i=1,n do
    snuke[i]=1
end
a={}    
for i=1,k do
    a[i]={}
    d=io.read("*n","*l")
    for j=1,d do
        a[i][j]=io.read("*n")
        if snuke[a[i][j]]==1 then
            snuke[a[i][j]]=0
        end
    end
end

counter=0
for i=1,n do
    counter=counter+snuke[i]
end
print(counter)