let nm = readLine()!.split(separator: " ").map{Int($0)!} var counter = 0 for _ in 1...nm[0]{ let S = readLine()! for i in S{ if i == "W"{ counter += 1 } } } print(counter)