import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    }


    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    }


    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} Main public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    } main {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    } FastScanner fs = new FastScanner(); fs new FastScanner() int n = fs.nextInt(); n fs.nextInt() fs.nextInt fs int k = fs.nextInt(); k fs.nextInt() fs.nextInt fs ArrayList<Integer> ans = new ArrayList<>(); ans new ArrayList<>() for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        } int TT = 0; int TT = 0; TT 0 TT < k TT k TT++ TT++ TT {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        } {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        } int d = fs.nextInt(); d fs.nextInt() fs.nextInt fs int[] ar = fs.readArray(d); ar fs.readArray(d) fs.readArray fs d boolean t = false; t false for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            } int i = 0; int i = 0; i 0 i < d i d i++ i++ i {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            } {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            } t = false t false for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                } int q = 0; int q = 0; q 0 q < ans.size() q ans.size() ans.size ans q++ q++ q {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                } {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                } if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    } ar[i] == ans.get(q) ar[i] ar i ans.get(q) ans.get ans q {
                        t = true;
                        break;
                    } t = true t true break; if (t == false) {
                    ans.add(ar[i]);
                } t == false t false {
                    ans.add(ar[i]);
                } ans.add(ar[i]) ans.add ans ar[i] ar i System.out.println(n-ans.size()) System.out.println System.out System System.out n-ans.size() n ans.size() ans.size ans String[] args args static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    } FastScanner BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st=new StringTokenizer(""); st new StringTokenizer("") String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } next {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        } while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st=new StringTokenizer(br.readLine());
                } st=new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        } readArray {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        } int[] a=new int[n]; a new int[n] n for (int i=0; i<n; i++) a[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=nextInt(); a[i]=nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    }


    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    }


    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int k = fs.nextInt();
        ArrayList<Integer> ans = new ArrayList<>();
        for (int TT = 0; TT < k; TT++) {
            int d = fs.nextInt();
            int[] ar = fs.readArray(d);
            boolean t = false;
            for (int i = 0; i < d; i++) {
                t = false;
                for (int q = 0; q < ans.size(); q++) {
                    if (ar[i] == ans.get(q)) {
                        t = true;
                        break;
                    }
                }
                if (t == false) {
                    ans.add(ar[i]);
                }

            }
        }
        System.out.println(n-ans.size());
    }


    static class FastScanner {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer("");
        String next() {
            while (!st.hasMoreTokens())
                try {
                    st=new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
        int[] readArray(int n) {
            int[] a=new int[n];
            for (int i=0; i<n; i++) a[i]=nextInt();
            return a;
        }
        long nextLong() {
            return Long.parseLong(next());
        }
    }

}
