fn g() -> String { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s } fn main() { g(); let s = g().replace("CPCTCPC", "CPCTF"); println!("{}", s.split("CPCTF").count() - 1) }