program main
  implicit none
  integer :: N, K
  integer,allocatable :: d(:),A(:,:)
  logical,allocatable :: have(:)
  integer :: i,j
  
  read(*,*) N,K
  allocate(d(K))
  allocate(A(K,N))
  allocate(have(N))
  have(:) = .false.
  do i = 1,K
     read(*,*) d(i)
     read(*,*) A(i,1:d(i))
  end do
  
  do i = 1,K
     do j = 1,d(i)
        have(A(i,j)) = .true.
     end do
  end do

  write(*,'(i0)') count(.not.have)
  
end program main
