

import java.util.ArrayList;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	}

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	}

} Main public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	} main {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int K = scanner.nextInt(); K scanner.nextInt() scanner.nextInt scanner int d d a; a ArrayList<Integer>array = new ArrayList<Integer>(); array new ArrayList<Integer>() for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		} int i=0; int i=0; i 0 i<K i K i++ i++ i {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		} {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		} d = scanner.nextInt() d scanner.nextInt() scanner.nextInt scanner for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			} int j=0; int j=0; j 0 j<d j d j++ j++ j {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			} {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			} a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner if( !array.contains(a) ) {
					array.add(a);
				} !array.contains(a) array.contains(a) array.contains array a {
					array.add(a);
				} array.add(a) array.add array a System.out.println( N - array.size() ) System.out.println System.out System System.out N - array.size() N array.size() array.size array scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	}

} public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	}

} Main


import java.util.ArrayList;
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int K = scanner.nextInt();
		int d,a;
		ArrayList<Integer>array = new ArrayList<Integer>();

		for(int i=0; i<K; i++) {
			d = scanner.nextInt();
			for(int j=0; j<d; j++) {
				a = scanner.nextInt();
				if( !array.contains(a) ) {
					array.add(a);
				}
			}
		}

		System.out.println( N - array.size() );

		scanner.close();


	}

}
