function Main(input) {
	var str = input;
	var data= [];
	var c = 0;
	const a = str.split('\n');
	var config  =a[0].split(" ");
	var p = config[0];//人数	
	var q = config[1];//お菓子
	for(var i = 1; i <= q; i++){
		arr = a[2*i].split(" ")
	data = data.concat(arr);
	}
// 	console.log(data);
	for(var j = 1; j <= p; j++){
		for(var k = 0;k<data.length;k++){
			if (data[k] == j){
				break;
			}
			if(k === data.length-1){
				c++;	
			}
		}
	}
 console.log(c);
 }
 
 
//*おまじない
Main(require("fs").readFileSync("/dev/stdin", "utf8"));