import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    }
} Main public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    } main {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    } int N N K K d; d Scanner sc = new Scanner(System.in); sc new Scanner(System.in) N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc int[] count = new int[N]; count new int[N] N for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        } int i = 0 ; int i = 0 ; i 0 i < K i K i++ i++ i {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        } {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        } d = sc.nextInt() d sc.nextInt() sc.nextInt sc int a[] = new int[d]; a new int[d] d for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            } int j = 0 ; int j = 0 ; j 0 j < d j d j++ j++ j {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            } {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            } a[j] = sc.nextInt() a[j] a j sc.nextInt() sc.nextInt sc count[a[j]-1] = 1 count[a[j]-1] count a[j]-1 a[j] a j 1 1 int dem = 0; dem 0 for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        } int i = 0 ; int i = 0 ; i 0 i < N i N i++ i++ i {
            dem += count[i] == 1 ? 1 : 0;
        } {
            dem += count[i] == 1 ? 1 : 0;
        } dem += count[i] == 1 ? 1 : 0 dem count[i] == 1 ? 1 : 0 count[i] == 1 count[i] count i 1 1 0 System.out.println(N - dem) System.out.println System.out System System.out N - dem N dem String[] args args public class Main {
    public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    }
} public class Main {
    public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int N, K, d;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        K = sc.nextInt();
        int[] count = new int[N];
        for(int i = 0 ; i < K ; i++)
        {
            d = sc.nextInt();
            int a[] = new int[d];
            for(int j = 0 ; j < d ; j++)
            {
                a[j] = sc.nextInt();
                count[a[j]-1] = 1;
            }
        }
        int dem = 0;
        for(int i = 0 ; i < N ; i++)
        {
            dem += count[i] == 1 ? 1 : 0;
        }
        System.out.println(N - dem);
    }
}
