import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    }
} Main public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    } main {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = Integer.parseInt(s.next()); n Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s int k = Integer.parseInt(s.next()); k Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s boolean sun[] = new boolean[n]; sun new boolean[n] n for(int i = 0; i < n;i++) {
            sun[i] = false;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            sun[i] = false;
        } {
            sun[i] = false;
        } sun[i] = false sun[i] sun i false for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        } {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        } int d = Integer.parseInt(s.next()); d Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            } int j = 0; int j = 0; j 0 j < d j d j++ j++ j {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            } {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            } int h = Integer.parseInt(s.next()); h Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s sun[h-1] = true sun[h-1] sun h-1 h 1 true int res = 0; res 0 for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if (!sun[i]) {
                res++;
            }
        } {
            if (!sun[i]) {
                res++;
            }
        } if (!sun[i]) {
                res++;
            } !sun[i] sun[i] sun i {
                res++;
            } res++ res System.out.println(res) System.out.println System.out System System.out res String args[] args public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

        int res = 0;
        for(int i = 0; i < n;i++) {
            if (!sun[i]) {
                res++;
            }
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int n = Integer.parseInt(s.next());
        int k = Integer.parseInt(s.next());
        boolean sun[] = new boolean[n];

        for(int i = 0; i < n;i++) {
            sun[i] = false;
        }

        for(int i = 0; i < k;i++) {
            int d = Integer.parseInt(s.next());
            for(int j = 0; j < d;j++) {
                int h = Integer.parseInt(s.next());
                sun[h-1] = true;
            }
        }

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