program main
  implicit none
  integer :: n, i, j, k, d, a(100)
  integer :: pena(100)
  pena(:) = 0
  read *, n, k
  pena(1:n) = 1
  do i = 1, k
    read *, d
    read *, a(1:d)
    do j = 1, d
      pena(a(j)) = 0
    end do
  end do
  print "(i0)", sum(pena)
end program main
