use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let v: Vec = s.split_whitespace().flat_map(str::parse).collect(); let mut a = vec![0; v[0]]; for i in v[2..].chunks(2) { a[i[1] - 1] = 1; } println!("{}", a.iter().filter(|&&x| x == 0).count()) }