import java.util.*; 
import java.lang.*; 


public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        }
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        } main {
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan int[] d = new int[K+1]; d new int[K+1] K+1 K 1 ArrayList<Integer> arrayList = new ArrayList<Integer>(); arrayList new ArrayList<Integer>() for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                } int i=1; int i=1; i 1 i<=K i K i++ i++ i {
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                } {
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                } d[i] = scan.nextInt() d[i] d i scan.nextInt() scan.nextInt scan for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        } int j=1; int j=1; j 1 j<=d[i] j d[i] d i j++ j++ j {
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        } {
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        } int[][] A = new int[K+1][d[i]+1]; A new int[K+1][d[i]+1] K+1 K 1 d[i]+1 d[i] d i 1 A[i][j] = scan.nextInt() A[i][j] A[i] A i j scan.nextInt() scan.nextInt scan arrayList.add(A[i][j]) arrayList.add arrayList A[i][j] A[i] A i j ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList)); listB new ArrayList<Integer>(new HashSet<>(arrayList)) System.out.println(N-listB.size()) System.out.println System.out System System.out N-listB.size() N listB.size() listB.size listB String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        }
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        }
} Main
import java.util.*; 
import java.lang.*; 


public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                int K = scan.nextInt();
                int[] d = new int[K+1];
                ArrayList<Integer> arrayList = new ArrayList<Integer>();
                
                for(int i=1; i<=K;i++){
                    d[i] = scan.nextInt();
                        for(int j=1; j<=d[i];j++){
                            int[][] A = new int[K+1][d[i]+1];
                            A[i][j] = scan.nextInt();
                            arrayList.add(A[i][j]);
                        }
                }
                
                ArrayList<Integer> listB = new ArrayList<Integer>(new HashSet<>(arrayList));

                System.out.println(N-listB.size());
      
        }
}