program main
integer :: n,k,d,ans = 0
integer,allocatable :: a(:),sn(:)

read(*,*)n,k
allocate(a(k),sn(n))
sn = 0

do i = 1,k
read(*,*)d
read(*,*)(a(j),j = 1,d) 
do j = 1,d
if (sn(a(j)) == 0) ans = ans +1
sn(a(j)) = 1
end do
end do

write(*,*) (n - ans)

end program main