function Main(input) {
    // 1行目がinput[0], 2行目がinput[1], …に入る
    input = input.trim();
    var N = input.split('\n')[0].split(' ')[0];
    var K = input.split('\n')[0].split(' ')[1];
    var ans = [];
    var array = input.split('\n');
    array.shift();
    for (var i = 1; i < array.length; i = i + 2) {
        var num = array[i].split(' ');
        var abc = num.map(Number);
        abc.map(Number);
        var array2 = ans.concat(abc);
        ans = array2;
    }
    var result = ans.filter(function (x, i, self) {
        return self.indexOf(x) === i;
    });
    var answer = N - result.length;
    console.log(answer);
    
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));