using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string[] input = Console.ReadLine().Split(' '); int n = int.Parse(input[0]); string str = ""; int wcnt = 0; for (int i = 0; i < n; i++) { str = Console.ReadLine(); for (int j = 0; j < str.Length; j++) { string temp = str.Substring(j, 1); if(temp=="W") { wcnt++; } } } Console.WriteLine(wcnt); } } }