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