import java.util.Scanner;
        
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc int[] arrayD = new int[k]; arrayD new int[k] k int[][] arrayA = new int[k][n]; arrayA new int[k][n] k n for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        } {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        } arrayD[i] = sc.nextInt() arrayD[i] arrayD i sc.nextInt() sc.nextInt sc for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            } {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            } if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                } j < arrayD[i] j arrayD[i] arrayD i {
                    arrayA[i][j] = sc.nextInt();
                } arrayA[i][j] = sc.nextInt() arrayA[i][j] arrayA[i] arrayA i j sc.nextInt() sc.nextInt sc {
                    arrayA[i][j] = 0;
                } arrayA[i][j] = 0 arrayA[i][j] arrayA[i] arrayA i j 0 int[] arrayAnswer = new int[n]; arrayAnswer new int[n] n for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        } {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        } for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            } {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            } if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                } arrayA[i][j] != 0 arrayA[i][j] arrayA[i] arrayA i j 0 {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                } arrayAnswer[arrayA[i][j] - 1] = 1 arrayAnswer[arrayA[i][j] - 1] arrayAnswer arrayA[i][j] - 1 arrayA[i][j] arrayA[i] arrayA i j 1 1 int count = 0; count 0 for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        } {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        } if(arrayAnswer[i] == 0) {
                count++;
            } arrayAnswer[i] == 0 arrayAnswer[i] arrayAnswer i 0 {
                count++;
            } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    }
} Main
import java.util.Scanner;
        
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] arrayD = new int[k];
        int[][] arrayA = new int[k][n];

        for (int i = 0; i < k; i++) {
            arrayD[i] = sc.nextInt();
            for (int j = 0; j < n; j++) {
                if (j < arrayD[i]) {
                    arrayA[i][j] = sc.nextInt();
                } else {
                    arrayA[i][j] = 0;
                }
            }
        }
        
        int[] arrayAnswer = new int[n];
        for (int i = 0; i < k; i++) {
            for (int j = 0; j < n; j++) {
                if (arrayA[i][j] != 0) {
                    arrayAnswer[arrayA[i][j] - 1] = 1;
                }
            }
        }

        int count = 0;
        for (int i = 0; i < n; i++) {
            if(arrayAnswer[i] == 0) {
                count++;
            }
            
        }
        System.out.println(count);
    }
}