const Main = (input) => {
  const tmp = input.trim().split('\n')
  const N = parseInt(tmp[0].split(' ')[0])
  const K = parseInt(tmp[0].split(' ')[1])

  const sunuke = {}

  for (let i = 1; i <= N; ++i) {
    sunuke[i] = ''
  }

  for (let j = 1; j <= K; j++) {
    const sweets = (j * 2 - 1).toString()
    const sunukeNum = tmp[j * 2].split(' ').map(n => n.toString())
    sunukeNum.forEach(elem => {
      sunuke[elem] += sweets
    })
  }

  let result = 0

  for (let i = 1; i <= N; ++i) {
    if (sunuke[i].length === 0) {
      result += 1
    }
  }

  console.log(result)
  return result
}

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