program sample
implicit none
integer N,K,d(100),A(100,100),i,j,B(100),count1
read(*,*) N,K
count1=0
do i=1,K
read(*,*) d(i)
read(*,*)(A(i,j),j=1,d(i))
end do
B=0
do i=1,K
do j=1,d(i)
B(A(i,j))=A(i,j)
end do
end do
do i=1,N
if (B(i)==0) then
count1=count1+1
end if
end do
write(*,*) count1
stop
end program sample