const Main = (input) => {
    ans=''
    const lines = input.split('\r')
    line0=lines[0].trim().split(" ")
    N=line0[0]
    K=lines[1]
    a=new Array(N)
    //console.log(a)
    for (i=2;i<lines.length;i=i+2){
        line=lines[i].trim().split(" ").map(n=>parseInt(n))

        for(j=0;j<line.length;j++){
           // console.log(line[j]-1)
            a[line[j]-1]=999999999999999
        }
    }
    ans=0
    //console.log(a)
    for( i=0 ;i<a.length;i++){
        if(a[i]!==999999999999999){
            ans++
        }
    }
    return ans
}


Main(require('fs').readFileSync('/dev/stdin', 'utf8'))