const lines = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const line1st = lines[0].split(' ');
const N = +line1st[0];
const K = +line1st[1];
const d = [];
const A = [];
for (let i = 1; i < 2 * K; i += 2) {
    d.push(+lines[i]);
    A.push(lines[i + 1].split(' ').map(v => +v));
}

// console.log(`N=${N}`);
// console.log(`K=${K}`);
// console.log(d);
// console.log(A);

let sum = N;
const S = {};
A.forEach(v => {
    v.forEach(i => {
        if (!S[i]) {
            sum --;
            S[i] = true;
        }
    })
});

console.log(sum);