#include using namespace std; int main(){ int n,m,ans=0; cin>>n>>m; for(int i=0;i>tmp; ans+=count(tmp.begin(),tmp.end(),'W'); } cout<