Option Explicit On

Module Module1

    Sub Main()

        Dim tmp As String() = Split(Console.ReadLine(), " ")
        Dim N As Integer = CInt(tmp(0))
        Dim K As Integer = CInt(tmp(1))

        Dim sunuke(N - 1) As Integer
        Dim okasi(K - 1) As Integer

        Dim ans As Integer = N
        For i As Integer = 0 To K - 1
            Dim d As Integer = Console.ReadLine()
            Dim tmp2 As String() = Split(Console.ReadLine(), " ")
            For j As Integer = 0 To d - 1
                If sunuke(j) = 0 Then
                    ans -= 1
                    sunuke(j) += 1
                End If
            Next
        Next

        Console.WriteLine(ans)

    End Sub

End Module

