program test 
implicit none
integer::n,k,d,i,j,ans
integer,allocatable::a(:),e(:)
read*,n,k
allocate(a(n))
allocate(e(n))
a=0
ans=0
do i=1,k
	e=0
	read*,d
   	read(5,*)(e(j),j=1,d)
    do j=1,d
        a(e(j))=a(e(j))+1
    end do
end do
do i=1,n
	if(a(i)==0)then
    	ans=ans+1
    else 
    	ans=ans
 	end if
end do
print*,ans
end program test