'use strict';
const p = s => console.log(s);
// let a,b,c,d;
// [a,b,c,d] = input[0].trim().split(" ").map(i => parseInt(i));

function main(input) {
  let N = input[0].trim().split(" ")[0];
  let K = input[0].trim().split(" ")[1];
  let A = [];
  let B = [];
  let sum = 0;
  let map = {};

  for(let i =1; i < 2 * K; i+=2) {
    A.push(input[i + 1].trim().split(" "));
  }


  for(let i =0; i < A.length; i++) {
    for(let j =0; j< A[i].length; j++) {
      map[A[i][j]] = 1;
    }
  }
  p(N - Object.keys(map).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));
