#include "bits/stdc++.h" using namespace std; int main(){ int h,w; cin >> h >>w; int ans =0; for(int i=0;i>z; if(z=='W')ans++; } cout <