function main(input) {
  const args = input.split("\n");
  const [N, K] = args[0].split(" ").map((n) => parseInt(n, 10));
  const sunukes = new Array(N).fill(false);

  for (let i = 2; i <= K * 2; i += 2) {
    args[i].split(" ").map((n) => parseInt(n, 10))
      .map((A) => { sunukes[A - 1] = true; });
  }

  console.log(sunukes.reduce((num, sunuke) => sunuke ? num : num + 1, 0));
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
