#include //#include using namespace std; int main(){ int n,m,ans;cin >>n >>m; for (int i = 0; i < n*m; i++){ int a;cin >>a; if(a=='W')ans++; } }