use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let a = s.lines().skip(1).filter(|s| { ["akai", "marui", "okii", "umai"] .iter() .all(|w| s.split(' ').any(|s| s == *w)) }); println!("{}", a.count()) }