program main
  
  implicit none
  integer :: n, k, i, j
  integer, allocatable :: a(:,:),d(:), b(:)
  integer :: m = 0
  
  read(*,*) n,k
  allocate(a(k,n))
  allocate(d(k))
  allocate(b(n))
  a = 0
  do i = 1, k
    read(*,*) d(i)
    read(*,*) a(i,1:d(i))
  end do
  
  b = 0
  do i = 1, k
    do j = 1, d(i)
      b(a(i,j)) = b(a(i,j)) + 1
    end do
  end do
  do i = 1, n
    if(b(i) == 0 ) m  = m + 1
  end do

  print*, m
   
end program main
