Problem:
Score : 200 points

Problem Statement

N Snukes called Snuke 1, Snuke 2, ..., Snuke N live in a town.

There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.

Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Constraints

All values in input are integers.

1 \leq N \leq 100

1 \leq K \leq 100

1 \leq d_i \leq N

1 \leq A_{i, 1} < \cdots < A_{i, d_i} \leq N

Input

Input is given from Standard Input in the following format:

N K
d_1
A_{1, 1} \cdots A_{1, d_1}
\vdots
d_K
A_{K, 1} \cdots A_{K, d_K}

Output

Print the answer.

Sample Input 1

3 2
2
1 3
1
3

Sample Output 1

1

Snuke 1 has Snack 1.

Snuke 2 has no snacks.

Snuke 3 has Snack 1 and 2.

Thus, there will be one victim: Snuke 2.

Sample Input 2

3 3
1
3
1
3
1
3

Sample Output 2

2

Solution in Go (1.14.1) (judge verdict: Accepted)

package main

import (
	"fmt"
	"strings"
    "os"
    "bufio"
    "strconv"
)
// 文字列を1行入力
func StrStdin() (stringInput string) {
    scanner := bufio.NewScanner(os.Stdin)

    scanner.Scan()
    stringInput = scanner.Text()

    stringInput = strings.TrimSpace(stringInput)//文字列の先頭と末尾の空白文字を削除する
    return
}
// 整数値1つ取得
func IntStdin() (int, error) {
    stringInput := StrStdin()
    return strconv.Atoi(strings.TrimSpace(stringInput))
}
// 空白や空文字だけの値を除去したSplit()
func SplitWithoutEmpty(stringTargeted string, delim string) (stringReturned []string) {
    stringSplited := strings.Split(stringTargeted, delim)

    for _, str := range stringSplited {
        if str != "" {
            stringReturned = append(stringReturned, str)
        }
    }

    return
}
// デリミタで分割して文字列スライスを取得
func SplitStrStdin(delim string) (stringReturned []string) {
    // 文字列で1行取得
    stringInput := StrStdin()

    // 空白で分割
    // stringSplited := strings.Split(stringInput, delim)
    stringReturned = SplitWithoutEmpty(stringInput, delim)

    return
}
// デリミタで分割して整数値スライスを取得
func SplitIntStdin(delim string) (intSlices []int, err error) {
    // 文字列スライスを取得
    stringSplited := SplitStrStdin(" ")

    // 整数スライスに保存
    for i := range stringSplited {
        var iparam int
        iparam, err = strconv.Atoi(stringSplited[i])//Atoi 文字列から整数
        if err != nil {
            return
        }
        intSlices = append(intSlices, iparam)
    }
    return
}
// 配列の中の同じ要素削除
func removeDuplicate1(oldarr []int)[]int{
	results := make([]int, 0, len(oldarr))
	encountered := map[int]bool{}
	for i:=0;i<len(oldarr);i++{
		if !encountered[oldarr[i]]{
			encountered[oldarr[i]] = true
			results = append(results, oldarr[i])
		}
	}
	return results
}

func main(){
	var N,K int
	fmt.Scan(&N,&K)
	var d []int
	var A []int
	for i:=0;i<K;i++{
		var di int 
		fmt.Scan(&di)
		d = append(d,di)

		Ai :=make([]int,di)
		for x:=0;x<di;x++{
			fmt.Scan(&Ai[x])
		}
		for j:=0;j<len(Ai);j++{
			A = append(A,Ai[j])
		}
	}

	result := removeDuplicate1(A)

	fmt.Println(N-len(result))

}