use std::io; fn input_num() -> Vec { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); let mut v = Vec::new(); for i in s.split_whitespace() { v.push(i.parse().unwrap()); } v } fn input_str() -> String { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); s } fn main() { let v = input_num(); let mut count = 0; let mut s; for _i in 0..v[0] { s = input_str(); for c in s.chars() { if c == 'W' { count += 1; } } } println!("{}", count); }