use std::io::*; fn main() { let mut nm = String::new(); std::io::stdin().read_line(&mut nm).ok(); let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let s = s.trim(); println!("{}", s.match_indices("W").count()); }