function main(input) {
  const inputs = input.split('\n')
  const [N, K] = inputs[0].split(' ').map(Number)
  const su = Array.from(new Array(N + 1))
  for(let i = 1; i <= K * 2; i += 2) {
    const d = inputs[i]
    const Ai = inputs[i+1].split(' ')
    // console.log(d, Ai)
    Ai.forEach(e => {
      su[e] = true
    })
  }
  // console.log(su)
  console.log(
    su.slice(1).reduce((h, e) => {
      return e === undefined ? h + 1 : h
    }, 0)
  )
}

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