let R () = stdin.ReadLine() let N, M = let t = R().Split() |> Array.map int t.[0], t.[1] let A = Array.init N (fun _ -> R()) let countWhite (line:string) = line.ToCharArray() |> Array.where(fun x -> x = 'W') |> Array.length let ans = A |> Array.sumBy(countWhite) ans |> printfn "%i"