// Vicfred
// https://atcoder.jp/contests/abc166/tasks/abc166_b
// implementation
import std.algorithm;
import std.array;
import std.conv;
import std.stdio;
import std.string;

void main() {
    int n, k;
    readf("%s %s\n", &n, &k);

    int[] snukes = new int[n];

    foreach(_; 0..k) {
        readln;
        int[] a = readln.split.map!(to!int).array;

        foreach(item; a) {
            snukes[item-1] = 1;
        }
    }
  snukes.count!("a == 0").writeln;
}