program main
      implicit none
      integer(4) :: n, k, i, j, d
      integer(4), allocatable :: cnt(:), a(:)

      read *, n, k

      allocate( cnt(n) )
      cnt = 0

      do i = 1, k
        read *, d
        allocate( a(d) )
        read *, a

        do j = 1, d
          cnt(a(j)) = cnt(a(j)) + 1
        end do

        deallocate( a )
      end do
     
      j = 0
      do i = 1, n
        if( cnt(i) == 0 ) then
          j = j + 1
        end if
      end do 
      print *, j

end program main
