program main
    implicit none
    integer sunuke(100), a(100,100), n, k, d, i, j, count
    read(*,*) n,k
    do i = 1, n
        sunuke(i)=0
    end do
    do i = 1, k
        read(*,*) d
        read(*,*) (a(i,j), j = 1, d)
        ! do j = 1, d
        !     write(*,fmt='(I4)',advance='no') a(i,j)
        ! end do
        ! write(*,*)
        do j = 1, d
            sunuke(a(i,j))=1
        end do
    end do
    count=0
    do i = 1, n
        if ( sunuke(i)==0 ) then
            count=count+1
        end if
    end do
    write(*,*) count
end program main