import java.util.Scanner

object Main {
  def main(args:Array[String]) = {
    val sc = new java.util.Scanner(System.in)
    val N = sc.nextInt
    val K = sc.nextInt
    
    var sunuke = List.fill(N)(0)
    
    for(i <-  1 to K){
    
        var d = sc.nextInt
        
        var list = List.fill(d)(sc.nextInt)
    
        list.foreach { v =>
            var okashi = sunuke(v - 1) + 1
            sunuke = sunuke.updated(v - 1, okashi)
        }
 
    }

    println( sunuke.count(_ == 0))
  }
}
