"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0].split(" ")[0]);
    const M = parseInt(arg[0].split(" ")[1]);
 
    const DA = arg.slice(1, M + 1);
    
    let map = {};
    
    for(let i in DA) {
        if(i % 2 !== 0) {
            let A = DA[i].split(" ").map(n=>parseInt(n));
            
            for(let j=0; j<A.length; j++) {
                if(!map[A[j]]) {
                    map[A[j]] = 1;
                } else {
                    map[A[j]]++;
                }
            }
        }
    }
    
    // console.log(JSON.stringify(map));
    console.log(N - Object.keys(map).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));