function Main(_input) {
    const lines = _input.split("\n");
    const first = lines[0].split(' ');
    const n = parseInt(first[0], 10);
    const k = parseInt(first[1], 10);
    const arr = [];

    for (let i = 0; i < n; i++) {
        arr[i] = 0;
    }

    for (let i = 0; i < k; i++) {
        const num = lines[i * 2 + 2].split(' ');
        for (let j = 0; j < num.length; j++) {
            const p = parseInt(num[j],10) - 1;
            if (!arr[p]) {
                arr[p] = 1;
            } else {
                arr[p]++;
            }
        }
    }

    console.log(arr.filter((val) => {
        return val === 0;
    }).length);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));