//
//  main.swift
//  AtCoder
//
//  Copyright © 2020 dazy. All rights reserved.
//

import Foundation

func readString() -> String {
    readLine()!
}

func readStringArray() -> [String] {
    readString().components(separatedBy: " ")
}

func readInt() -> Int {
    Int(readString())!
}

func readIntArray() -> [Int] {
    readStringArray().map { Int($0)! }
}

func readStringTupple() -> (String, String) {
    let array = readStringArray()
    return (array[0], array[1])
}

func readStringTupple() -> (String, String, String) {
    let array = readStringArray()
    return (array[0], array[1], array[2])
}

func readIntTupple() -> (Int, Int) {
    let array = readIntArray()
    return (array[0], array[1])
}

func readIntTupple() -> (Int, Int, Int) {
    let array = readIntArray()
    return (array[0], array[1], array[2])
}


let (n, k) = readIntTupple()
var s = [Bool](repeating: true, count: n + 1)
s[0] = false
for _ in 0..<k {
    let _ = readInt()
    let a = readIntArray()
    for i in a {
        s[i] = false
    }
}
print(s.filter { $0 }.count)
