   program abc166b
      implicit none
      integer::n,k
      integer,allocatable::a(:),sunuke(:)
      integer::i,j,d,count

         read *, n,k
         allocate(a(n),sunuke(n))

         sunuke=0;a=0
         do i=1,k
            read *, d
            read *, a(1:d)
            do j=1,d
               sunuke(a(j))=sunuke(a(j))+1
            end do
         end do

         count=0
         do i=1,n
            if (sunuke(i)==0) count=count+1
         end do

         print *, count

   end program abc166b