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

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    }
} 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.List; List java.util public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int N = Integer.parseInt(str[0]); N Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int K = Integer.parseInt(str[1]); K Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 List<List<Integer>> A = new ArrayList<>(K); A new ArrayList<>(K) for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        } int i=0; int i=0; i 0 i<K i K ++i ++i i {
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        } {
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        } A.add(new ArrayList<>()) A.add A new ArrayList<>() int d = Integer.parseInt(br.readLine()); d Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br str = br.readLine().split(" ") str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j])); int j=0; int j=0; j 0 j<d j d ++j ++j j A.get(i).add(Integer.parseInt(str[j])); A.get(i).add(Integer.parseInt(str[j])) A.get(i).add A.get(i) A.get A i Integer.parseInt(str[j]) Integer.parseInt Integer str[j] str j int res = 0; res 0 for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        } int i=1; int i=1; i 1 i<=N i N ++i ++i i {
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        } {
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        } boolean have = false; have false for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            } List<Integer> snack A {
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            } {
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            } for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                } int j=0; int j=0; j 0 j<snack.size() j snack.size() snack.size snack ++j ++j j {
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                } {
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                } if(snack.get(j) == i){
                        have = true;
                        break;
                    } snack.get(j) == i snack.get(j) snack.get snack j i {
                        have = true;
                        break;
                    } have = true have true break; if(have) break; have break; if(!have) res++; !have have 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) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] str = br.readLine().split(" ");
        int N = Integer.parseInt(str[0]);
        int K = Integer.parseInt(str[1]);
        List<List<Integer>> A = new ArrayList<>(K);
        for(int i=0; i<K; ++i){
            A.add(new ArrayList<>());
            int d = Integer.parseInt(br.readLine());
            str = br.readLine().split(" ");
            for(int j=0; j<d; ++j)
                A.get(i).add(Integer.parseInt(str[j]));
        }
        int res = 0;
        for(int i=1; i<=N; ++i){
            boolean have = false;
            for(List<Integer> snack : A){
                for(int j=0; j<snack.size(); ++j){
                    if(snack.get(j) == i){
                        have = true;
                        break;
                    }
                }
                if(have) break;
            }
            if(!have) res++;
        }
        System.out.println(res);
    }
}
