import std;

void main() {
    int n, k; scan(n, k);
    auto s = new int[n + 1];
    foreach (_; 0..k) {
        readint;
        foreach (e; readints) s[e]++;
    }
    auto ans = n - s[1..$].count!(e => e > 0);
    writeln(ans);
}

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;
