import java.util.Scanner;
import java.util.HashSet;
public class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } 
} import java.util.Scanner; Scanner java.util import java.util.HashSet; HashSet java.util public class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } 
} Main public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } main {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } Scanner sc= new Scanner(System.in); sc new Scanner(System.in) int sunuke = sc.nextInt(); sunuke sc.nextInt() sc.nextInt sc int kashi = sc.nextInt(); kashi sc.nextInt() sc.nextInt sc HashSet set = new HashSet(); set new HashSet() int motteru = 0; motteru 0 for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      } int i = 0; int i = 0; i 0 i < kashi i kashi i++ i++ i {
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      } {
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      } motteru = sc.nextInt() motteru sc.nextInt() sc.nextInt sc for(int j = 0; j < motteru;j++) set.add(sc.nextInt()); int j = 0; int j = 0; j 0 j < motteru j motteru j++ j++ j set.add(sc.nextInt()); set.add(sc.nextInt()) set.add set sc.nextInt() sc.nextInt sc System.out.println(sunuke - set.size()) System.out.println System.out System System.out sunuke - set.size() sunuke set.size() set.size set String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } 
} public class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } 
} Main
import java.util.Scanner;
import java.util.HashSet;
public class Main {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int sunuke = sc.nextInt();
        int kashi = sc.nextInt();
      HashSet set = new HashSet();
      int motteru = 0;
      for(int i = 0; i < kashi; i++){
        motteru = sc.nextInt();
        for(int j = 0; j < motteru;j++) set.add(sc.nextInt());
      }
        
        System.out.println(sunuke - set.size());
    } 
}