program abc80
 implicit none
 integer(8)::N,K,ia,ib,d,ic
 integer(8),allocatable::a(:),b(:)
 read(*,*)N,K
 allocate(a(N))
 a=0
 do ia=1,K
  read(*,*)d
  allocate(b(d))
  read(*,*)(b(ic),ic=1,d)
  do ib=1,d
   a(b(ib))=a(b(ib))+1
  end do
  deallocate(b)
 end do
 print'(i0)',count(a==0)
 deallocate(a)
end program abc80