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

